mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-24 03:32:35 +08:00
[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 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349080 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user