[PATCH] D54439: CMake: Make most target symbols hidden by default

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 18 10:53:48 PDT 2019


rnk added inline comments.


================
Comment at: llvm/include/llvm/PassSupport.h:42
   static llvm::once_flag Initialize##passName##PassFlag;                       \
   void llvm::initialize##passName##Pass(PassRegistry &Registry) {              \
     llvm::call_once(Initialize##passName##PassFlag,                            \
----------------
Do we need the same thing here? We instantiate the same template, which I would expect to raise the same warning, if this macro is used from two files that use hidden and default visibility.


================
Comment at: llvm/include/llvm/PassSupport.h:62-63
   static llvm::once_flag Initialize##passName##PassFlag;                       \
+  LLVM_EXTERNAL_VISIBILITY /* FIXME: Workaround to avoid ld warnings on OS X*/ \
+			   /* when this is compiled with -fvisibility=hidden*/ \
   void llvm::initialize##passName##Pass(PassRegistry &Registry) {              \
----------------
Is this a speculative fix, or were you able to reproduce the problem and confirm this fixes it?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54439/new/

https://reviews.llvm.org/D54439





More information about the llvm-commits mailing list