[libc++abi] Clean up visibility

Use the libc++abi visibility macros instead of pragmas or using
visibility attributes directly. Clean up redundant attributes on
definitions (where the declarations already have visibility attributes
applied, from either libc++ or libc++abi headers).

Introduce _LIBCXXABI_WEAK as a drive-by cleanup, which matches the
semantics of _LIBCPP_WEAK.

No functional change. Tested by building on Linux before and after this
change and verifying that the list of exported symbols is identical.

Differential Revision: https://reviews.llvm.org/D26949

llvm-svn: 296576
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: fe989a98176a7215cdbbcedcdf65e630f40a0d80
diff --git a/src/fallback_malloc.h b/src/fallback_malloc.h
index 1078442..cb2c843 100644
--- a/src/fallback_malloc.h
+++ b/src/fallback_malloc.h
@@ -10,21 +10,18 @@
 #ifndef _FALLBACK_MALLOC_H
 #define _FALLBACK_MALLOC_H
 
+#include "__cxxabi_config.h"
 #include <cstddef> // for size_t
 
 namespace __cxxabiv1 {
 
-#pragma GCC visibility push(hidden)
-
 // Allocate some memory from _somewhere_
-void * __malloc_with_fallback(size_t size);
+_LIBCXXABI_HIDDEN void * __malloc_with_fallback(size_t size);
 
 // Allocate and zero-initialize memory from _somewhere_
-void * __calloc_with_fallback(size_t count, size_t size);
+_LIBCXXABI_HIDDEN void * __calloc_with_fallback(size_t count, size_t size);
 
-void __free_with_fallback(void *ptr);
-
-#pragma GCC visibility pop
+_LIBCXXABI_HIDDEN void __free_with_fallback(void *ptr);
 
 } // namespace __cxxabiv1