[llvm-branch-commits] [llvm] [NFC][BOLT] Rename createDummyReturnFunction to createReturnBody (PR #98448)
Paschalis Mpeis via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jul 11 01:42:14 PDT 2024
https://github.com/paschalis-mpeis created https://github.com/llvm/llvm-project/pull/98448
`createDummyReturnFunction` is not creating a function but instead only a function body
that is simply a return statement.
This patch renames it to `createReturnBody`
>From b564185beebcd5d4d18036edfd2f1a76370f3f8f Mon Sep 17 00:00:00 2001
From: Paschalis Mpeis <Paschalis.Mpeis at arm.com>
Date: Thu, 11 Jul 2024 09:32:12 +0100
Subject: [PATCH] [NFC][BOLT] Rename createDummyReturnFunction to
createReturnBody
createDummyReturnFunction is not creating a function but instead only
a function body that is simply a return statement. So it is renamed to:
createReturnBody
---
bolt/include/bolt/Core/MCPlusBuilder.h | 2 +-
bolt/lib/Passes/Instrumentation.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
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()));
}
}
}
More information about the llvm-branch-commits
mailing list