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

Aaron Ballman via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 05:07:06 PDT 2026


================
@@ -3862,6 +3862,14 @@ def warn_not_xl_compatible
       InGroup<AIXCompat>;
 def note_misaligned_member_used_here : Note<
     "passing byval argument %0 with potentially incompatible alignment here">;
+def warn_loadtime_comment_var_not_preserved
+    : Warning<"%0 named in '-mloadtime-comment-vars=' %select{is "
+              "volatile-qualified|does not have static storage duration|is "
+              "not constant-initialized|is not initialized with a string "
+              "literal|is a function-local variable|is a static data member|"
+              "is a variable template specialization}1 and will not be "
+              "preserved">,
----------------
AaronBallman wrote:

```suggestion
    : Warning<"%0 named in '-mloadtime-comment-vars=' is %select{"
              "volatile-qualified|does not have static storage duration|"
              "not constant-initialized|is not initialized with a string "
              "literal|a function-local variable|is a static data member|"
              "a variable template specialization}1 and will not be "
              "preserved">,
```
Minor simplification

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


More information about the llvm-commits mailing list