[PATCH] D53153: [OpenCL] Mark namespace scope variables and kernel functions with default visibility

Scott Linder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 12 11:33:08 PDT 2018


scott.linder added a comment.

The rationale is that `-fvisibility` only affects the default, and already does not apply in many cases. For example, see the rest of the conditions above the fvisibility check in `getLVForNamespaceScopeDecl`: when `Var->getStorageClass() == SC_Static` the linkage is (usually) internal and the visibility is default. In cases where individual symbols need unique visibility an `__attribute__` can be used.

I think one question is whether OpenCL language semantics allow us to make these visibility determinations; I am going off of the APIs available to access symbols.


https://reviews.llvm.org/D53153





More information about the cfe-commits mailing list