summaryrefslogtreecommitdiffstats
path: root/libcxx
diff options
context:
space:
mode:
authorThomas Anderson <thomasanderson@google.com>2018-12-13 20:06:14 +0000
committerThomas Anderson <thomasanderson@google.com>2018-12-13 20:06:14 +0000
commit1cffc3848596277db26c63b70aeb6035f6b13b85 (patch)
tree655eb2a87792cf50cc41744e7c379bed1601edf5 /libcxx
parentdc73a6edde8607cadc94f89ba29012a96dca7d81 (diff)
downloadbcm5719-llvm-1cffc3848596277db26c63b70aeb6035f6b13b85.tar.gz
bcm5719-llvm-1cffc3848596277db26c63b70aeb6035f6b13b85.zip
[libc++] Fix _LIBCPP_EXPORTED_FROM_ABI when visibility annotations are disabled
Fixes a bug where functions would get exported when building with -fvisibility=hidden and defining _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS. No visibility annotations should be added in this case. The new logic for _LIBCPP_EXPORTED_FROM_ABI matches that of the other visibility annotations around it. Differential Revision: https://reviews.llvm.org/D55664 llvm-svn: 349080
Diffstat (limited to 'libcxx')
-rw-r--r--libcxx/include/__config6
1 files changed, 5 insertions, 1 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config
index 88c207c7244..b5e7b763210 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -715,7 +715,11 @@ typedef __char32_t char32_t;
#endif
#ifndef _LIBCPP_EXPORTED_FROM_ABI
-# define _LIBCPP_EXPORTED_FROM_ABI __attribute__((__visibility__("default")))
+# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
+# define _LIBCPP_EXPORTED_FROM_ABI __attribute__((__visibility__("default")))
+# else
+# define _LIBCPP_EXPORTED_FROM_ABI
+# endif
#endif
#ifndef _LIBCPP_OVERRIDABLE_FUNC_VIS
OpenPOWER on IntegriCloud