Skip to content

Commit

Permalink
[BOLT][NFC] Format braced initializer lists
Browse files Browse the repository at this point in the history
Summary:
Use assignment (`=`) with braced initializer lists when constructing
aggregate temporaries in expressions.

https://llvm.org/docs/CodingStandards.html#braced-initializer-lists

(cherry picked from FBD33515669)
  • Loading branch information
aaupov authored and maksfb committed Jan 10, 2022
1 parent 8aab58b commit b1a107d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bolt/include/bolt/Core/BinaryBasicBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ class BinaryBasicBlock {
MCSymbol *Label{nullptr};

/// [Begin, End) address range for this block in the output binary.
std::pair<uint32_t, uint32_t> OutputAddressRange{0, 0};
std::pair<uint32_t, uint32_t> OutputAddressRange = {0, 0};

/// Original offset range of the basic block in the function.
std::pair<uint32_t, uint32_t> InputRange{INVALID_OFFSET, INVALID_OFFSET};
std::pair<uint32_t, uint32_t> InputRange = {INVALID_OFFSET, INVALID_OFFSET};

/// Map input offset (from function start) of an instruction to an output
/// symbol. Enables writing BOLT address translation tables used for mapping
Expand Down
2 changes: 1 addition & 1 deletion bolt/lib/Passes/BinaryPasses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ uint64_t fixDoubleJumps(BinaryFunction &Function, bool MarkInvalid) {
if (((!Succ || &BB == Succ) && !IsTailCall) || (IsTailCall && !SuccSym))
continue;

std::vector<BinaryBasicBlock *> Preds{BB.pred_begin(), BB.pred_end()};
std::vector<BinaryBasicBlock *> Preds = {BB.pred_begin(), BB.pred_end()};

for (BinaryBasicBlock *Pred : Preds) {
if (Pred->isLandingPad())
Expand Down

0 comments on commit b1a107d

Please sign in to comment.