[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
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 1cffc3848596277db26c63b70aeb6035f6b13b85
diff --git a/include/__config b/include/__config
index 88c207c..b5e7b76 100644
--- a/include/__config
+++ b/include/__config
@@ -715,7 +715,11 @@
 #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