[llvm] [ORC] Use SmallVector/SmallString for small hot paths (PR #148379)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 12 09:00:54 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
index 945243c0a..a8d1bfa26 100644
--- a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
@@ -8,6 +8,8 @@
#include "llvm/ExecutionEngine/Orc/LLJIT.h"
+#include "llvm/ADT/SmallString.h"
+#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Config/llvm-config.h" // for LLVM_ENABLE_THREADS
#include "llvm/ExecutionEngine/Orc/COFFPlatform.h"
@@ -28,8 +30,6 @@
#include "llvm/IR/Mangler.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/DynamicLibrary.h"
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/SmallString.h"
#define DEBUG_TYPE "orc"
@@ -522,8 +522,8 @@ GlobalCtorDtorScraper::operator()(ThreadSafeModule TSM,
return Error::success();
SmallString<64> InitOrDeInitFunctionName;
raw_svector_ostream(InitOrDeInitFunctionName)
- << (isCtor ? InitFunctionPrefix : DeInitFunctionPrefix)
- << M.getModuleIdentifier();
+ << (isCtor ? InitFunctionPrefix : DeInitFunctionPrefix)
+ << M.getModuleIdentifier();
MangleAndInterner Mangle(PS.getExecutionSession(), M.getDataLayout());
auto InternedInitOrDeInitName = Mangle(InitOrDeInitFunctionName);
``````````
</details>
https://github.com/llvm/llvm-project/pull/148379
More information about the llvm-commits
mailing list