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

Tony Varghese via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 29 18:55:03 PDT 2026


================
@@ -546,6 +546,10 @@ class LangOptions : public LangOptionsBase {
   /// A list of all -fno-builtin-* function names (e.g., memset).
   std::vector<std::string> NoBuiltinFuncs;
 
+  /// List of mangled variable names to preserve as loadtime comment
+  /// variables.
+  std::vector<std::string> LoadTimeCommentVars;
----------------
tonykuttai wrote:

Agree, but LangOptions stores all its list-valued options as `std::vector<std::string>` . it works with the existing option marshalling code `MarshallingInfoStringVector`. We could change the sema side to use a StringSet, but would it be really required I mean (I may be wrong here) we would only end with a handful of strings by the time Sema uses this vector for linear scan.

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


More information about the cfe-commits mailing list