Skip to content

Commit

Permalink
[BOLT][NFC] Fix braces usage in Profile
Browse files Browse the repository at this point in the history
Summary:
Refactor bolt/*/Profile to follow the braces rule for if/else/loop from
[LLVM Coding Standards](https://llvm.org/docs/CodingStandards.html).

(cherry picked from FBD33345741)
  • Loading branch information
aaupov authored and maksfb committed Dec 29, 2021
1 parent 89ceb77 commit def464a
Show file tree
Hide file tree
Showing 6 changed files with 133 additions and 216 deletions.
6 changes: 2 additions & 4 deletions bolt/lib/Profile/BoltAddressTranslation.cpp
Expand Up @@ -230,9 +230,8 @@ BoltAddressTranslation::getFallthroughsInTrace(const BinaryFunction &Func,
To -= Func.getAddress();

auto Iter = Maps.find(Func.getAddress());
if (Iter == Maps.end()) {
if (Iter == Maps.end())
return NoneType();
}

const MapTy &Map = Iter->second;
auto FromIter = Map.upper_bound(From);
Expand Down Expand Up @@ -261,9 +260,8 @@ BoltAddressTranslation::getFallthroughsInTrace(const BinaryFunction &Func,
}

++Iter;
while (Iter->second & BRANCHENTRY && Iter != ToIter) {
while (Iter->second & BRANCHENTRY && Iter != ToIter)
++Iter;
}
if (Iter->second & BRANCHENTRY)
break;
Res.emplace_back(Src, Iter->first);
Expand Down

0 comments on commit def464a

Please sign in to comment.