[clang] [llvm] [Clang][AIX] Add -mloadtime-comment-vars flag to preserve identifying variables (PR #187986)
Hubert Tong via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 21 14:50:01 PDT 2026
================
@@ -15452,6 +15520,13 @@ void Sema::FinalizeDeclaration(Decl *ThisDecl) {
}
}
+ // Validate variables named in '-mloadtime-comment-vars=': supported string
+ // variables get an implicit attribute that CodeGen uses to preserve them;
+ // named variables that cannot be preserved are diagnosed.
+ if (!getLangOpts().LoadTimeCommentVars.empty() && !VD->isInvalidDecl() &&
+ Context.getTargetInfo().getTriple().isOSAIX())
----------------
hubert-reinterpretcast wrote:
Isn't the last condition implied by the first?
https://github.com/llvm/llvm-project/pull/187986
More information about the cfe-commits
mailing list