ibc++abi: mark visibility

Mark functions and types with the appropriate visibility.  This is particularly
useful for environments which explicitly indicate origin of functions (Windows).
This aids in generating libc++abi as a DSO which exposes only the public
interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@254691 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/src/cxa_demangle.cpp b/src/cxa_demangle.cpp
index b6388ab..04dc711 100644
--- a/src/cxa_demangle.cpp
+++ b/src/cxa_demangle.cpp
@@ -10,6 +10,8 @@
 #define _LIBCPP_EXTERN_TEMPLATE(...)
 #define _LIBCPP_NO_EXCEPTIONS
 
+#include "__cxxabi_config.h"
+
 #include <vector>
 #include <algorithm>
 #include <string>
@@ -4922,7 +4924,7 @@
 
 }  // unnamed namespace
 
-extern "C" __attribute__((__visibility__("default"))) char *
+extern "C" _LIBCXXABI_FUNC_VIS char *
 __cxa_demangle(const char *mangled_name, char *buf, size_t *n, int *status) {
     if (mangled_name == nullptr || (buf != nullptr && n == nullptr))
     {