================
@@ -15460,6 +15461,108 @@ void Sema::CheckThreadLocalForLargeAlignment(VarDecl 
*VD) {
   }
 }
 
+/// Process a variable definition whose mangled name may be listed in
+/// '-mloadtime-comment-vars=': attach an implicit attribute to supported
+/// string variables so CodeGen preserves them as loadtime identifying
+/// strings, and warn when a named variable cannot be preserved.
+static void processForLoadTimeCommentVar(Sema &S, VarDecl *VD) {
----------------
AaronBallman wrote:

I forgot that this was supposed to be limited to strings, so a more interesting 
test case would be an array of `char *` that gets expanded into the binding 
declarations. But given that this is going for existing code patterns, you may 
prefer to just reject things which aren't `VarDecl` until you have a use case 
requiring it be supported.

https://github.com/llvm/llvm-project/pull/187986
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to