Skip to content

Commit deff3af

Browse files
[NFC][BOLT] Rename createDummyReturnFunction to createReturnInstructi.. (#98448)
`createDummyReturnFunction` is not creating a function but instead only a function body that is simply a return statement. This patch renames it to: `createReturnInstructionList`
1 parent 6469faf commit deff3af

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

bolt/include/bolt/Core/MCPlusBuilder.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2044,7 +2044,8 @@ 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 createDummyReturnFunction(MCContext *Ctx) const {
2047+
virtual InstructionListType
2048+
createReturnInstructionList(MCContext *Ctx) const {
20482049
InstructionListType Insts(1);
20492050
createReturn(Insts[0]);
20502051
return Insts;

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->createDummyReturnFunction(BC.Ctx.get()));
757+
BC.MIB->createReturnInstructionList(BC.Ctx.get()));
758758
}
759759
}
760760
}

0 commit comments

Comments
 (0)