[llvm-branch-commits] [llvm] [NFC][BOLT] Rename createDummyReturnFunction to createReturnBody (PR #98448)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jul 11 01:43:31 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-bolt
Author: Paschalis Mpeis (paschalis-mpeis)
<details>
<summary>Changes</summary>
`createDummyReturnFunction` is not creating a function but instead only a function body
that is simply a return statement.
This patch renames it to `createReturnBody`
---
Stacked on top of:
- #<!-- -->96626
---
Full diff: https://github.com/llvm/llvm-project/pull/98448.diff
2 Files Affected:
- (modified) bolt/include/bolt/Core/MCPlusBuilder.h (+1-1)
- (modified) bolt/lib/Passes/Instrumentation.cpp (+1-1)
``````````diff
diff --git a/bolt/include/bolt/Core/MCPlusBuilder.h b/bolt/include/bolt/Core/MCPlusBuilder.h
index 885d627f7b64f..c20b0edc36499 100644
--- a/bolt/include/bolt/Core/MCPlusBuilder.h
+++ b/bolt/include/bolt/Core/MCPlusBuilder.h
@@ -2044,7 +2044,7 @@ class MCPlusBuilder {
/// 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 createReturnBody(MCContext *Ctx) const {
InstructionListType Insts(1);
createReturn(Insts[0]);
return Insts;
diff --git a/bolt/lib/Passes/Instrumentation.cpp b/bolt/lib/Passes/Instrumentation.cpp
index e824a42d82696..805e7a7434f8f 100644
--- a/bolt/lib/Passes/Instrumentation.cpp
+++ b/bolt/lib/Passes/Instrumentation.cpp
@@ -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->createReturnBody(BC.Ctx.get()));
}
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/98448
More information about the llvm-branch-commits
mailing list