[PATCH] D50968: [AST] make a static local variable in a hidden inlined fuction visible

Hiroshi Inoue via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 20 09:47:30 PDT 2018


inouehrs added a comment.

In https://reviews.llvm.org/D50968#1205958, @jsji wrote:

> GCC option document mentions explicitly that local static variables should NOT be affected by -fvisibility-inlines-hidden.


Oh, thanks! I have not found this document.



================
Comment at: lib/AST/Decl.cpp:1275
+
     LV = getLVForDecl(FD, computation);
   }
----------------
rnk wrote:
> I think the right way to do this is to compute the linkage & visibility of FD, as is done here, check if the visibility is explicit, and if not, under the same conditions that you have above, upgrade the visibility to default.
I agree. I will try to fix this. Thanks.


https://reviews.llvm.org/D50968





More information about the llvm-commits mailing list