[llvm-branch-commits] [clang] [llvm] [Clang][AIX] Add -mloadtime-comment-vars flag to preserve identifying variables (PR #187986)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Mar 23 00:31:51 PDT 2026


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 origin/main HEAD --extensions c,h,cpp -- clang/test/CodeGen/loadtime-comment-vars.c clang/include/clang/Basic/CodeGenOptions.h clang/lib/CodeGen/CodeGenModule.cpp clang/lib/CodeGen/CodeGenModule.h clang/lib/Driver/ToolChains/Clang.cpp llvm/lib/Transforms/Utils/LowerCommentStringPass.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

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

``````````diff
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index a2432a80e..739e0c1bc 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1634,7 +1634,7 @@ void CodeGenModule::Release() {
   EmitBackendOptionsMetadata(getCodeGenOpts());
 
   EmitLoadTimeComment();
-  
+
   // Handle CLI load-time string variables
   EmitLoadTimeCommentVars();
 
diff --git a/llvm/lib/Transforms/Utils/LowerCommentStringPass.cpp b/llvm/lib/Transforms/Utils/LowerCommentStringPass.cpp
index 3a20694a6..5b0cfa582 100644
--- a/llvm/lib/Transforms/Utils/LowerCommentStringPass.cpp
+++ b/llvm/lib/Transforms/Utils/LowerCommentStringPass.cpp
@@ -115,7 +115,7 @@ PreservedAnalyses LowerCommentStringPass::run(Module &M,
       }
     }
     MD->eraseFromParent();
-  }  
+  }
 
   // 2. Process copyright variables - multiple allowed per TU
   for (GlobalVariable &GV : M.globals()) {

``````````

</details>


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


More information about the llvm-branch-commits mailing list