Skip to content

Commit 1a0542a

Browse files
Addressing reviewers (2)
1 parent 542e46e commit 1a0542a

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

bolt/include/bolt/Core/MCPlusBuilder.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2044,7 +2044,11 @@ class MCPlusBuilder {
20442044
/// Returns a function body that contains only a return instruction. An
20452045
/// example usage is a workaround for the '__bolt_fini_trampoline' of
20462046
// Instrumentation.
2047-
virtual InstructionListType createDummyReturn(MCContext *Ctx) const;
2047+
virtual InstructionListType createDummyReturnFunction(MCContext *Ctx) const {
2048+
InstructionListType Insts(1);
2049+
createReturn(Insts[0]);
2050+
return Insts;
2051+
}
20482052

20492053
/// This method takes an indirect call instruction and splits it up into an
20502054
/// equivalent set of instructions that use direct calls for target

bolt/lib/Core/MCPlusBuilder.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,6 @@ bool MCPlusBuilder::isTailCall(const MCInst &Inst) const {
147147
return false;
148148
}
149149

150-
InstructionListType MCPlusBuilder::createDummyReturn(MCContext *Ctx) const {
151-
InstructionListType Insts(1);
152-
createReturn(Insts[0]);
153-
return Insts;
154-
}
155-
156150
std::optional<MCLandingPad> MCPlusBuilder::getEHInfo(const MCInst &Inst) const {
157151
if (!isCall(Inst))
158152
return std::nullopt;

bolt/lib/Passes/Instrumentation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ void Instrumentation::createAuxiliaryFunctions(BinaryContext &BC) {
754754
// with unknown symbol in runtime library. E.g. for static PIE
755755
// executable
756756
createSimpleFunction("__bolt_fini_trampoline",
757-
BC.MIB->createDummyReturn(BC.Ctx.get()));
757+
BC.MIB->createDummyReturnFunction(BC.Ctx.get()));
758758
}
759759
}
760760
}

0 commit comments

Comments
 (0)