forked from OSchip/llvm-project
[BOLT] Fix for missing entry offset
Temporary fix for missing entry offset when creating address translation tables (BAT) after D127935 landed. Will later work on assigning a more reasonable offset different than zero. Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D128092
This commit is contained in:
parent
feb8313fbf
commit
9d5e6ccd9b
|
@ -106,6 +106,7 @@ bool ValidateInternalCalls::fixCFGForPIC(BinaryFunction &Function) const {
|
|||
// block.
|
||||
std::vector<std::unique_ptr<BinaryBasicBlock>> NewBBs;
|
||||
NewBBs.emplace_back(Function.createBasicBlock());
|
||||
NewBBs.back()->setOffset(0);
|
||||
NewBBs.back()->addInstructions(MovedInsts.begin(), MovedInsts.end());
|
||||
BB.moveAllSuccessorsTo(NewBBs.back().get());
|
||||
Function.insertBasicBlocks(&BB, std::move(NewBBs));
|
||||
|
|
Loading…
Reference in New Issue