Skip to content

Commit

Permalink
[BOLT] fix build with gcc-4.8.5
Browse files Browse the repository at this point in the history
Summary: These are two minor changes to make it copatible with gcc-4.8.5

(cherry picked from FBD9884971)
  • Loading branch information
igorsugak authored and maksfb committed Sep 17, 2018
1 parent ce508b5 commit cc2276d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion bolt/src/BinaryBasicBlock.h
Expand Up @@ -736,7 +736,9 @@ class BinaryBasicBlock {
adjustNumPseudos(*II, -1);
adjustNumPseudos(Begin, End, 1);

return Instructions.insert(Instructions.erase(II), Begin, End);
auto i = II - Instructions.begin();
Instructions.insert(Instructions.erase(II), Begin, End);
return i + Instructions.begin();
}

iterator replaceInstruction(iterator II,
Expand Down
2 changes: 1 addition & 1 deletion bolt/src/DataAggregator.cpp
Expand Up @@ -903,7 +903,7 @@ ErrorOr<AggregatedLBREntry> DataAggregator::parseAggregatedLBREntry() {
auto TypeOrErr = parseString(FieldSeparator);
if (std::error_code EC = TypeOrErr.getError())
return EC;
auto Type{AggregatedLBREntry::BRANCH};
auto Type = AggregatedLBREntry::BRANCH;
if (TypeOrErr.get() == "B") {
Type = AggregatedLBREntry::BRANCH;
} else if (TypeOrErr.get() == "F") {
Expand Down

0 comments on commit cc2276d

Please sign in to comment.