[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`
This commit is contained in:
Paschalis Mpeis
2024-07-15 18:30:40 +03:00
committed by GitHub
parent 6469faf9fd
commit deff3afd35
2 changed files with 3 additions and 2 deletions

View File

@@ -2044,7 +2044,8 @@ public:
/// Returns a function body that contains only a return instruction. An
/// example usage is a workaround for the '__bolt_fini_trampoline' of
// Instrumentation.
virtual InstructionListType createDummyReturnFunction(MCContext *Ctx) const {
virtual InstructionListType
createReturnInstructionList(MCContext *Ctx) const {
InstructionListType Insts(1);
createReturn(Insts[0]);
return Insts;

View File

@@ -754,7 +754,7 @@ void Instrumentation::createAuxiliaryFunctions(BinaryContext &BC) {
// with unknown symbol in runtime library. E.g. for static PIE
// executable
createSimpleFunction("__bolt_fini_trampoline",
BC.MIB->createDummyReturnFunction(BC.Ctx.get()));
BC.MIB->createReturnInstructionList(BC.Ctx.get()));
}
}
}