[clang] [llvm] handle wrapper (PR #123795)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 10:17:03 PST 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 6518b121f037717fd211c36659f7b25266424719 64265ebd451b09a0703d360aa8dbe822382eda60 --extensions cpp,h -- clang/lib/CodeGen/BackendUtil.cpp llvm/lib/Target/DirectX/DirectXTargetMachine.cpp llvm/lib/Target/SPIRV/SPIRVTargetMachine.cpp llvm/include/llvm/Transforms/HLSL/DXILFinalizeLinkage.h llvm/lib/Transforms/HLSL/DXILFinalizeLinkage.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 23445ebc36..e67dd8a875 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -56,9 +56,10 @@
 #include "llvm/Target/TargetOptions.h"
 #include "llvm/TargetParser/SubtargetFeature.h"
 #include "llvm/TargetParser/Triple.h"
-#include "llvm/Transforms/HipStdPar/HipStdPar.h"
 #include "llvm/Transforms/HLSL/DXILFinalizeLinkage.h"
+#include "llvm/Transforms/HipStdPar/HipStdPar.h"
 #include "llvm/Transforms/IPO/EmbedBitcodePass.h"
+#include "llvm/Transforms/IPO/GlobalOpt.h"
 #include "llvm/Transforms/IPO/LowerTypeTests.h"
 #include "llvm/Transforms/IPO/ThinLTOBitcodeWriter.h"
 #include "llvm/Transforms/InstCombine/InstCombine.h"
@@ -83,7 +84,6 @@
 #include "llvm/Transforms/ObjCARC.h"
 #include "llvm/Transforms/Scalar/EarlyCSE.h"
 #include "llvm/Transforms/Scalar/GVN.h"
-#include "llvm/Transforms/IPO/GlobalOpt.h"
 #include "llvm/Transforms/Scalar/JumpThreading.h"
 #include "llvm/Transforms/Utils/Debugify.h"
 #include "llvm/Transforms/Utils/ModuleUtils.h"
diff --git a/llvm/lib/Transforms/HLSL/DXILFinalizeLinkage.cpp b/llvm/lib/Transforms/HLSL/DXILFinalizeLinkage.cpp
index c0dc4a6aa7..a1d53d0498 100644
--- a/llvm/lib/Transforms/HLSL/DXILFinalizeLinkage.cpp
+++ b/llvm/lib/Transforms/HLSL/DXILFinalizeLinkage.cpp
@@ -18,7 +18,7 @@ using namespace llvm;
 static bool finalizeLinkage(Module &M) {
   SmallPtrSet<Function *, 8> Funcs;
 
-  for(auto &Var : M.globals()) {
+  for (auto &Var : M.globals()) {
     if (Var.getLinkage() == GlobalValue::ExternalLinkage) {
       Var.setLinkage(GlobalValue::InternalLinkage);
     }

``````````

</details>


https://github.com/llvm/llvm-project/pull/123795


More information about the llvm-commits mailing list