[libcxx-commits] [libcxx] f1ea0b1 - [libc++] Merge _LIBCPP_FUNC_VIS, _LIBCPP_TYPE_VIS and _LIBCPP_EXCEPTION_ABI into _LIBCPP_EXPORTED_FROM_ABI

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 15 08:56:50 PDT 2023


Author: Nikolas Klauser
Date: 2023-06-15T08:56:45-07:00
New Revision: f1ea0b11ca03d0f8b5785b7ec92d2eb673eeb4b9

URL: https://github.com/llvm/llvm-project/commit/f1ea0b11ca03d0f8b5785b7ec92d2eb673eeb4b9
DIFF: https://github.com/llvm/llvm-project/commit/f1ea0b11ca03d0f8b5785b7ec92d2eb673eeb4b9.diff

LOG: [libc++] Merge _LIBCPP_FUNC_VIS, _LIBCPP_TYPE_VIS and _LIBCPP_EXCEPTION_ABI into _LIBCPP_EXPORTED_FROM_ABI

These macros are always defined identically, so we can simplify the code a bit by merging them.

Reviewed By: ldionne, #libc

Spies: libcxx-commits, krytarowski, smeenai

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

Added: 
    

Modified: 
    libcxx/.clang-format
    libcxx/docs/DesignDocs/VisibilityMacros.rst
    libcxx/include/__algorithm/shuffle.h
    libcxx/include/__algorithm/sort.h
    libcxx/include/__charconv/from_chars_result.h
    libcxx/include/__charconv/to_chars_floating_point.h
    libcxx/include/__charconv/to_chars_result.h
    libcxx/include/__chrono/file_clock.h
    libcxx/include/__chrono/steady_clock.h
    libcxx/include/__chrono/system_clock.h
    libcxx/include/__condition_variable/condition_variable.h
    libcxx/include/__config
    libcxx/include/__debug
    libcxx/include/__exception/exception.h
    libcxx/include/__exception/exception_ptr.h
    libcxx/include/__exception/nested_exception.h
    libcxx/include/__exception/operations.h
    libcxx/include/__exception/terminate.h
    libcxx/include/__filesystem/directory_entry.h
    libcxx/include/__filesystem/directory_iterator.h
    libcxx/include/__filesystem/file_status.h
    libcxx/include/__filesystem/filesystem_error.h
    libcxx/include/__filesystem/operations.h
    libcxx/include/__filesystem/path.h
    libcxx/include/__filesystem/path_iterator.h
    libcxx/include/__filesystem/recursive_directory_iterator.h
    libcxx/include/__filesystem/space_info.h
    libcxx/include/__format/format_error.h
    libcxx/include/__format/formatter_output.h
    libcxx/include/__functional/bind.h
    libcxx/include/__functional/function.h
    libcxx/include/__hash_table
    libcxx/include/__locale
    libcxx/include/__memory/align.h
    libcxx/include/__memory/shared_ptr.h
    libcxx/include/__memory_resource/memory_resource.h
    libcxx/include/__memory_resource/monotonic_buffer_resource.h
    libcxx/include/__memory_resource/pool_options.h
    libcxx/include/__memory_resource/synchronized_pool_resource.h
    libcxx/include/__memory_resource/unsynchronized_pool_resource.h
    libcxx/include/__mutex/mutex.h
    libcxx/include/__mutex/tag_types.h
    libcxx/include/__random/random_device.h
    libcxx/include/__string/extern_template_lists.h
    libcxx/include/__support/win32/locale_win32.h
    libcxx/include/__system_error/error_category.h
    libcxx/include/__system_error/error_code.h
    libcxx/include/__system_error/error_condition.h
    libcxx/include/__system_error/system_error.h
    libcxx/include/__threading_support
    libcxx/include/__tuple/sfinae_helpers.h
    libcxx/include/__utility/in_place.h
    libcxx/include/any
    libcxx/include/codecvt
    libcxx/include/condition_variable
    libcxx/include/experimental/memory_resource
    libcxx/include/future
    libcxx/include/ios
    libcxx/include/iosfwd
    libcxx/include/iostream
    libcxx/include/locale
    libcxx/include/mutex
    libcxx/include/new
    libcxx/include/optional
    libcxx/include/regex
    libcxx/include/shared_mutex
    libcxx/include/stdexcept
    libcxx/include/string
    libcxx/include/strstream
    libcxx/include/thread
    libcxx/include/typeinfo
    libcxx/include/valarray
    libcxx/include/variant
    libcxx/src/any.cpp
    libcxx/src/charconv.cpp
    libcxx/src/condition_variable_destructor.cpp
    libcxx/src/debug.cpp
    libcxx/src/experimental/memory_resource.cpp
    libcxx/src/filesystem/int128_builtins.cpp
    libcxx/src/iostream.cpp
    libcxx/src/legacy_pointer_safety.cpp
    libcxx/src/memory_resource.cpp
    libcxx/src/mutex_destructor.cpp
    libcxx/src/optional.cpp
    libcxx/src/support/ibm/mbsnrtowcs.cpp
    libcxx/src/support/ibm/wcsnrtombs.cpp
    libcxx/src/valarray.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/.clang-format b/libcxx/.clang-format
index 4fd10e88b2ca8..bb7abc6efc494 100644
--- a/libcxx/.clang-format
+++ b/libcxx/.clang-format
@@ -24,13 +24,10 @@ AttributeMacros: ['_LIBCPP_HIDE_FROM_ABI',
                   '_LIBCPP_DISABLE_EXTENTSION_WARNING',
                   '_LIBCPP_HIDDEN',
                   '_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS',
-                  '_LIBCPP_FUNC_VIS',
-                  '_LIBCPP_TYPE_VIS',
                   '_LIBCPP_TEMPLATE_VIS',
                   '_LIBCPP_TEMPLATE_DATA_VIS',
                   '_LIBCPP_EXPORTED_FROM_ABI',
                   '_LIBCPP_OVERRIDABLE_FUNC_VIS',
-                  '_LIBCPP_EXCEPTION_ABI',
                   '_LIBCPP_ENUM_VIS',
                   '_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS',
                   '_LIBCPP_INTERNAL_LINKAGE',

diff  --git a/libcxx/docs/DesignDocs/VisibilityMacros.rst b/libcxx/docs/DesignDocs/VisibilityMacros.rst
index d1c162682b666..0beee4f80f020 100644
--- a/libcxx/docs/DesignDocs/VisibilityMacros.rst
+++ b/libcxx/docs/DesignDocs/VisibilityMacros.rst
@@ -20,13 +20,9 @@ Visibility Macros
 **_LIBCPP_HIDDEN**
   Mark a symbol as hidden so it will not be exported from shared libraries.
 
-**_LIBCPP_FUNC_VIS**
-  Mark a symbol as being exported by the libc++ library. This attribute must
-  be applied to the declaration of all functions exported by the libc++ dylib.
-
 **_LIBCPP_EXPORTED_FROM_ABI**
-  Mark a symbol as being exported by the libc++ library. This attribute may
-  only be applied to objects defined in the libc++ runtime library. On Windows,
+  Mark a symbol as being part of our ABI. This includes functions that are part
+  of the libc++ library, type information and other symbols. On Windows,
   this macro applies `dllimport`/`dllexport` to the symbol, and on other
   platforms it gives the symbol default visibility.
 
@@ -65,10 +61,6 @@ Visibility Macros
   ABI, we should create a new _LIBCPP_HIDE_FROM_ABI_AFTER_XXX macro, and we can
   use it to start removing symbols from the ABI after that stable version.
 
-**_LIBCPP_TYPE_VIS**
-  Mark a type's typeinfo, vtable and members as having default visibility.
-  This attribute cannot be used on class templates.
-
 **_LIBCPP_TEMPLATE_VIS**
   Mark a type's typeinfo and vtable as having default visibility.
   This macro has no effect on the visibility of the type's member functions.
@@ -152,13 +144,6 @@ Visibility Macros
   against the libc++ headers after making `_LIBCPP_TYPE_VIS` and
   `_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS` expand to default visibility.
 
-**_LIBCPP_EXCEPTION_ABI**
-  Mark the member functions, typeinfo, and vtable of the type as being exported
-  by the libc++ library. This macro must be applied to all *exception types*.
-  Exception types should be defined directly in namespace `std` and not the
-  versioning namespace. This allows throwing and catching some exception types
-  between libc++ and libstdc++.
-
 Links
 =====
 

diff  --git a/libcxx/include/__algorithm/shuffle.h b/libcxx/include/__algorithm/shuffle.h
index d6cc3401a6de1..f7848b1abfe7b 100644
--- a/libcxx/include/__algorithm/shuffle.h
+++ b/libcxx/include/__algorithm/shuffle.h
@@ -29,7 +29,7 @@ _LIBCPP_PUSH_MACROS
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_TYPE_VIS __libcpp_debug_randomizer {
+class _LIBCPP_EXPORTED_FROM_ABI __libcpp_debug_randomizer {
 public:
   _LIBCPP_HIDE_FROM_ABI __libcpp_debug_randomizer() {
     __state_ = __seed();
@@ -65,11 +65,11 @@ class _LIBCPP_TYPE_VIS __libcpp_debug_randomizer {
 
 #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE) \
   || defined(_LIBCPP_BUILDING_LIBRARY)
-class _LIBCPP_TYPE_VIS __rs_default;
+class _LIBCPP_EXPORTED_FROM_ABI __rs_default;
 
-_LIBCPP_FUNC_VIS __rs_default __rs_get();
+_LIBCPP_EXPORTED_FROM_ABI __rs_default __rs_get();
 
-class _LIBCPP_TYPE_VIS __rs_default
+class _LIBCPP_EXPORTED_FROM_ABI __rs_default
 {
     static unsigned __c_;
 
@@ -88,10 +88,10 @@ class _LIBCPP_TYPE_VIS __rs_default
     static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR result_type min() {return _Min;}
     static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR result_type max() {return _Max;}
 
-    friend _LIBCPP_FUNC_VIS __rs_default __rs_get();
+    friend _LIBCPP_EXPORTED_FROM_ABI __rs_default __rs_get();
 };
 
-_LIBCPP_FUNC_VIS __rs_default __rs_get();
+_LIBCPP_EXPORTED_FROM_ABI __rs_default __rs_get();
 
 template <class _RandomAccessIterator>
 _LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX14 void

diff  --git a/libcxx/include/__algorithm/sort.h b/libcxx/include/__algorithm/sort.h
index 24fbd2af6067f..c56215b9cbd41 100644
--- a/libcxx/include/__algorithm/sort.h
+++ b/libcxx/include/__algorithm/sort.h
@@ -826,23 +826,23 @@ inline _LIBCPP_HIDE_FROM_ABI _Number __log2i(_Number __n) {
 template <class _Comp, class _RandomAccessIterator>
 void __sort(_RandomAccessIterator, _RandomAccessIterator, _Comp);
 
-extern template _LIBCPP_FUNC_VIS void __sort<__less<char>&, char*>(char*, char*, __less<char>&);
+extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<char>&, char*>(char*, char*, __less<char>&);
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template _LIBCPP_FUNC_VIS void __sort<__less<wchar_t>&, wchar_t*>(wchar_t*, wchar_t*, __less<wchar_t>&);
+extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<wchar_t>&, wchar_t*>(wchar_t*, wchar_t*, __less<wchar_t>&);
 #endif
-extern template _LIBCPP_FUNC_VIS void __sort<__less<signed char>&, signed char*>(signed char*, signed char*, __less<signed char>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<unsigned char>&, unsigned char*>(unsigned char*, unsigned char*, __less<unsigned char>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<short>&, short*>(short*, short*, __less<short>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<unsigned short>&, unsigned short*>(unsigned short*, unsigned short*, __less<unsigned short>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<int>&, int*>(int*, int*, __less<int>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<unsigned>&, unsigned*>(unsigned*, unsigned*, __less<unsigned>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<long>&, long*>(long*, long*, __less<long>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<unsigned long>&, unsigned long*>(unsigned long*, unsigned long*, __less<unsigned long>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<long long>&, long long*>(long long*, long long*, __less<long long>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<unsigned long long>&, unsigned long long*>(unsigned long long*, unsigned long long*, __less<unsigned long long>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<float>&, float*>(float*, float*, __less<float>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<double>&, double*>(double*, double*, __less<double>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<long double>&, long double*>(long double*, long double*, __less<long double>&);
+extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<signed char>&, signed char*>(signed char*, signed char*, __less<signed char>&);
+extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<unsigned char>&, unsigned char*>(unsigned char*, unsigned char*, __less<unsigned char>&);
+extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<short>&, short*>(short*, short*, __less<short>&);
+extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<unsigned short>&, unsigned short*>(unsigned short*, unsigned short*, __less<unsigned short>&);
+extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<int>&, int*>(int*, int*, __less<int>&);
+extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<unsigned>&, unsigned*>(unsigned*, unsigned*, __less<unsigned>&);
+extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<long>&, long*>(long*, long*, __less<long>&);
+extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<unsigned long>&, unsigned long*>(unsigned long*, unsigned long*, __less<unsigned long>&);
+extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<long long>&, long long*>(long long*, long long*, __less<long long>&);
+extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<unsigned long long>&, unsigned long long*>(unsigned long long*, unsigned long long*, __less<unsigned long long>&);
+extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<float>&, float*>(float*, float*, __less<float>&);
+extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<double>&, double*>(double*, double*, __less<double>&);
+extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<long double>&, long double*>(long double*, long double*, __less<long double>&);
 
 template <class _AlgPolicy, class _RandomAccessIterator, class _Comp>
 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void

diff  --git a/libcxx/include/__charconv/from_chars_result.h b/libcxx/include/__charconv/from_chars_result.h
index 7eeb9ec81ce5d..fa98616a0cb76 100644
--- a/libcxx/include/__charconv/from_chars_result.h
+++ b/libcxx/include/__charconv/from_chars_result.h
@@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #if _LIBCPP_STD_VER >= 17
 
-struct _LIBCPP_TYPE_VIS from_chars_result {
+struct _LIBCPP_EXPORTED_FROM_ABI from_chars_result {
   const char* ptr;
   errc ec;
 #  if _LIBCPP_STD_VER >= 20

diff  --git a/libcxx/include/__charconv/to_chars_floating_point.h b/libcxx/include/__charconv/to_chars_floating_point.h
index 6ede36e88dff0..08720e1078852 100644
--- a/libcxx/include/__charconv/to_chars_floating_point.h
+++ b/libcxx/include/__charconv/to_chars_floating_point.h
@@ -23,31 +23,31 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #if _LIBCPP_STD_VER >= 17
 
-_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS to_chars_result
+_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_EXPORTED_FROM_ABI to_chars_result
 to_chars(char* __first, char* __last, float __value);
 
-_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS to_chars_result
+_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_EXPORTED_FROM_ABI to_chars_result
 to_chars(char* __first, char* __last, double __value);
 
-_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS to_chars_result
+_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_EXPORTED_FROM_ABI to_chars_result
 to_chars(char* __first, char* __last, long double __value);
 
-_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS to_chars_result
+_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_EXPORTED_FROM_ABI to_chars_result
 to_chars(char* __first, char* __last, float __value, chars_format __fmt);
 
-_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS to_chars_result
+_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_EXPORTED_FROM_ABI to_chars_result
 to_chars(char* __first, char* __last, double __value, chars_format __fmt);
 
-_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS to_chars_result
+_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_EXPORTED_FROM_ABI to_chars_result
 to_chars(char* __first, char* __last, long double __value, chars_format __fmt);
 
-_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS to_chars_result
+_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_EXPORTED_FROM_ABI to_chars_result
 to_chars(char* __first, char* __last, float __value, chars_format __fmt, int __precision);
 
-_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS to_chars_result
+_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_EXPORTED_FROM_ABI to_chars_result
 to_chars(char* __first, char* __last, double __value, chars_format __fmt, int __precision);
 
-_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS to_chars_result
+_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_EXPORTED_FROM_ABI to_chars_result
 to_chars(char* __first, char* __last, long double __value, chars_format __fmt, int __precision);
 #endif // _LIBCPP_STD_VER >= 17
 

diff  --git a/libcxx/include/__charconv/to_chars_result.h b/libcxx/include/__charconv/to_chars_result.h
index 67221b3983cfa..aba5e5f06b5bf 100644
--- a/libcxx/include/__charconv/to_chars_result.h
+++ b/libcxx/include/__charconv/to_chars_result.h
@@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #if _LIBCPP_STD_VER >= 17
 
-struct _LIBCPP_TYPE_VIS to_chars_result {
+struct _LIBCPP_EXPORTED_FROM_ABI to_chars_result {
   char* ptr;
   errc ec;
 #  if _LIBCPP_STD_VER >= 20

diff  --git a/libcxx/include/__chrono/file_clock.h b/libcxx/include/__chrono/file_clock.h
index 80a0944740e37..557a880ed4522 100644
--- a/libcxx/include/__chrono/file_clock.h
+++ b/libcxx/include/__chrono/file_clock.h
@@ -63,7 +63,7 @@ struct _FilesystemClock {
   _LIBCPP_EXPORTED_FROM_ABI
   static _LIBCPP_CONSTEXPR_SINCE_CXX14 const bool is_steady = false;
 
-  _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_FUNC_VIS static time_point now() noexcept;
+  _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_EXPORTED_FROM_ABI static time_point now() noexcept;
 
 #if _LIBCPP_STD_VER >= 20
   template <class _Duration>

diff  --git a/libcxx/include/__chrono/steady_clock.h b/libcxx/include/__chrono/steady_clock.h
index ba83351738dd4..cdcd2fa0d9709 100644
--- a/libcxx/include/__chrono/steady_clock.h
+++ b/libcxx/include/__chrono/steady_clock.h
@@ -24,7 +24,7 @@ namespace chrono
 {
 
 #ifndef _LIBCPP_HAS_NO_MONOTONIC_CLOCK
-class _LIBCPP_TYPE_VIS steady_clock
+class _LIBCPP_EXPORTED_FROM_ABI steady_clock
 {
 public:
     typedef nanoseconds                                   duration;

diff  --git a/libcxx/include/__chrono/system_clock.h b/libcxx/include/__chrono/system_clock.h
index e8a41ceabe352..06fe071df2b60 100644
--- a/libcxx/include/__chrono/system_clock.h
+++ b/libcxx/include/__chrono/system_clock.h
@@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 namespace chrono
 {
 
-class _LIBCPP_TYPE_VIS system_clock
+class _LIBCPP_EXPORTED_FROM_ABI system_clock
 {
 public:
     typedef microseconds                     duration;

diff  --git a/libcxx/include/__condition_variable/condition_variable.h b/libcxx/include/__condition_variable/condition_variable.h
index 8fc80b63366b8..8ff49963834f3 100644
--- a/libcxx/include/__condition_variable/condition_variable.h
+++ b/libcxx/include/__condition_variable/condition_variable.h
@@ -37,7 +37,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 _LIBCPP_DECLARE_STRONG_ENUM(cv_status){no_timeout, timeout};
 _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(cv_status)
 
-class _LIBCPP_TYPE_VIS condition_variable {
+class _LIBCPP_EXPORTED_FROM_ABI condition_variable {
   __libcpp_condvar_t __cv_ = _LIBCPP_CONDVAR_INITIALIZER;
 
 public:

diff  --git a/libcxx/include/__config b/libcxx/include/__config
index 17229e21114fb..40f7891a04105 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -539,9 +539,6 @@ typedef __char32_t char32_t;
 #      define _LIBCPP_EXPORTED_FROM_ABI __declspec(dllimport)
 #    endif
 
-#    define _LIBCPP_TYPE_VIS _LIBCPP_DLL_VIS
-#    define _LIBCPP_FUNC_VIS _LIBCPP_DLL_VIS
-#    define _LIBCPP_EXCEPTION_ABI _LIBCPP_DLL_VIS
 #    define _LIBCPP_HIDDEN
 #    define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
 #    define _LIBCPP_TEMPLATE_VIS
@@ -557,11 +554,8 @@ typedef __char32_t char32_t;
 #    endif
 
 #    define _LIBCPP_HIDDEN _LIBCPP_VISIBILITY("hidden")
-#    define _LIBCPP_FUNC_VIS _LIBCPP_VISIBILITY("default")
-#    define _LIBCPP_TYPE_VIS _LIBCPP_VISIBILITY("default")
 #    define _LIBCPP_TEMPLATE_DATA_VIS _LIBCPP_VISIBILITY("default")
 #    define _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_VISIBILITY("default")
-#    define _LIBCPP_EXCEPTION_ABI _LIBCPP_VISIBILITY("default")
 #    define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS _LIBCPP_VISIBILITY("default")
 #    define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
 
@@ -705,7 +699,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
 
 #  ifdef _LIBCPP_CXX03_LANG
 #    define _LIBCPP_DECLARE_STRONG_ENUM(x)                                                                             \
-      struct _LIBCPP_TYPE_VIS x {                                                                                      \
+      struct _LIBCPP_EXPORTED_FROM_ABI x {                                                                                      \
         enum __lx
 // clang-format off
 #    define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x)                                                                      \
@@ -902,7 +896,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
 #  endif
 
 #  ifndef _LIBCPP_HAS_NO_ASAN
-    extern "C" _LIBCPP_FUNC_VIS void
+    extern "C" _LIBCPP_EXPORTED_FROM_ABI void
     __sanitizer_annotate_contiguous_container(const void*, const void*, const void*, const void*);
 #  endif
 

diff  --git a/libcxx/include/__debug b/libcxx/include/__debug
index 1a080fd203d2e..fc3599bab7c56 100644
--- a/libcxx/include/__debug
+++ b/libcxx/include/__debug
@@ -41,9 +41,9 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-struct _LIBCPP_TYPE_VIS __c_node;
+struct _LIBCPP_EXPORTED_FROM_ABI __c_node;
 
-struct _LIBCPP_TYPE_VIS __i_node
+struct _LIBCPP_EXPORTED_FROM_ABI __i_node
 {
     void* __i_;
     __i_node* __next_;
@@ -58,7 +58,7 @@ struct _LIBCPP_TYPE_VIS __i_node
     ~__i_node();
 };
 
-struct _LIBCPP_TYPE_VIS __c_node
+struct _LIBCPP_EXPORTED_FROM_ABI __c_node
 {
     void* __c_;
     __c_node* __next_;
@@ -136,7 +136,7 @@ _C_node<_Cont>::__subscriptable(const void* __i, ptr
diff _t __n) const
     return __cp->__subscriptable(__j, __n);
 }
 
-class _LIBCPP_TYPE_VIS __libcpp_db
+class _LIBCPP_EXPORTED_FROM_ABI __libcpp_db
 {
     __c_node** __cbeg_;
     __c_node** __cend_;
@@ -202,11 +202,11 @@ private:
     _LIBCPP_HIDDEN
     __i_node* __find_iterator(const void* __i) const;
 
-    friend _LIBCPP_FUNC_VIS __libcpp_db* __get_db();
+    friend _LIBCPP_EXPORTED_FROM_ABI __libcpp_db* __get_db();
 };
 
-_LIBCPP_FUNC_VIS __libcpp_db* __get_db();
-_LIBCPP_FUNC_VIS const __libcpp_db* __get_const_db();
+_LIBCPP_EXPORTED_FROM_ABI __libcpp_db* __get_db();
+_LIBCPP_EXPORTED_FROM_ABI const __libcpp_db* __get_const_db();
 
 _LIBCPP_END_NAMESPACE_STD
 

diff  --git a/libcxx/include/__exception/exception.h b/libcxx/include/__exception/exception.h
index 49a58dd16999a..3db0126da2969 100644
--- a/libcxx/include/__exception/exception.h
+++ b/libcxx/include/__exception/exception.h
@@ -69,7 +69,7 @@ class bad_exception : public exception {
 // On all other platforms, we define our own std::exception and std::bad_exception types
 // regardless of whether exceptions are turned on as a language feature.
 
-class _LIBCPP_EXCEPTION_ABI exception {
+class _LIBCPP_EXPORTED_FROM_ABI exception {
 public:
   _LIBCPP_HIDE_FROM_ABI exception() _NOEXCEPT {}
   _LIBCPP_HIDE_FROM_ABI exception(const exception&) _NOEXCEPT = default;
@@ -78,7 +78,7 @@ class _LIBCPP_EXCEPTION_ABI exception {
   virtual const char* what() const _NOEXCEPT;
 };
 
-class _LIBCPP_EXCEPTION_ABI bad_exception : public exception {
+class _LIBCPP_EXPORTED_FROM_ABI bad_exception : public exception {
 public:
   _LIBCPP_HIDE_FROM_ABI bad_exception() _NOEXCEPT {}
   ~bad_exception() _NOEXCEPT override;

diff  --git a/libcxx/include/__exception/exception_ptr.h b/libcxx/include/__exception/exception_ptr.h
index 1307481f00526..970d8196724b7 100644
--- a/libcxx/include/__exception/exception_ptr.h
+++ b/libcxx/include/__exception/exception_ptr.h
@@ -23,7 +23,7 @@ namespace std { // purposefully not using versioning namespace
 
 #ifndef _LIBCPP_ABI_MICROSOFT
 
-class _LIBCPP_TYPE_VIS exception_ptr {
+class _LIBCPP_EXPORTED_FROM_ABI exception_ptr {
   void* __ptr_;
 
 public:
@@ -44,8 +44,8 @@ class _LIBCPP_TYPE_VIS exception_ptr {
     return !(__x == __y);
   }
 
-  friend _LIBCPP_FUNC_VIS exception_ptr current_exception() _NOEXCEPT;
-  friend _LIBCPP_FUNC_VIS void rethrow_exception(exception_ptr);
+  friend _LIBCPP_EXPORTED_FROM_ABI exception_ptr current_exception() _NOEXCEPT;
+  friend _LIBCPP_EXPORTED_FROM_ABI void rethrow_exception(exception_ptr);
 };
 
 template <class _Ep>
@@ -64,7 +64,7 @@ _LIBCPP_HIDE_FROM_ABI exception_ptr make_exception_ptr(_Ep __e) _NOEXCEPT {
 
 #else // _LIBCPP_ABI_MICROSOFT
 
-class _LIBCPP_TYPE_VIS exception_ptr {
+class _LIBCPP_EXPORTED_FROM_ABI exception_ptr {
   _LIBCPP_DIAGNOSTIC_PUSH
   _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wunused-private-field")
   void* __ptr1_;
@@ -81,17 +81,17 @@ class _LIBCPP_TYPE_VIS exception_ptr {
   explicit operator bool() const _NOEXCEPT;
 };
 
-_LIBCPP_FUNC_VIS bool operator==(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT;
+_LIBCPP_EXPORTED_FROM_ABI bool operator==(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT;
 
 inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT {
   return !(__x == __y);
 }
 
-_LIBCPP_FUNC_VIS void swap(exception_ptr&, exception_ptr&) _NOEXCEPT;
+_LIBCPP_EXPORTED_FROM_ABI void swap(exception_ptr&, exception_ptr&) _NOEXCEPT;
 
-_LIBCPP_FUNC_VIS exception_ptr __copy_exception_ptr(void* __except, const void* __ptr);
-_LIBCPP_FUNC_VIS exception_ptr current_exception() _NOEXCEPT;
-_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void rethrow_exception(exception_ptr);
+_LIBCPP_EXPORTED_FROM_ABI exception_ptr __copy_exception_ptr(void* __except, const void* __ptr);
+_LIBCPP_EXPORTED_FROM_ABI exception_ptr current_exception() _NOEXCEPT;
+_LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void rethrow_exception(exception_ptr);
 
 // This is a built-in template function which automagically extracts the required
 // information.

diff  --git a/libcxx/include/__exception/nested_exception.h b/libcxx/include/__exception/nested_exception.h
index 182c7ddda6537..1136c9274888c 100644
--- a/libcxx/include/__exception/nested_exception.h
+++ b/libcxx/include/__exception/nested_exception.h
@@ -28,7 +28,7 @@
 
 namespace std { // purposefully not using versioning namespace
 
-class _LIBCPP_EXCEPTION_ABI nested_exception {
+class _LIBCPP_EXPORTED_FROM_ABI nested_exception {
   exception_ptr __ptr_;
 
 public:

diff  --git a/libcxx/include/__exception/operations.h b/libcxx/include/__exception/operations.h
index e8c5ba61ee0e2..78e7c7a5d0b51 100644
--- a/libcxx/include/__exception/operations.h
+++ b/libcxx/include/__exception/operations.h
@@ -21,22 +21,22 @@ namespace std { // purposefully not using versioning namespace
 #if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS) ||                             \
     defined(_LIBCPP_BUILDING_LIBRARY)
 using unexpected_handler = void (*)();
-_LIBCPP_FUNC_VIS unexpected_handler set_unexpected(unexpected_handler) _NOEXCEPT;
-_LIBCPP_FUNC_VIS unexpected_handler get_unexpected() _NOEXCEPT;
-_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void unexpected();
+_LIBCPP_EXPORTED_FROM_ABI unexpected_handler set_unexpected(unexpected_handler) _NOEXCEPT;
+_LIBCPP_EXPORTED_FROM_ABI unexpected_handler get_unexpected() _NOEXCEPT;
+_LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void unexpected();
 #endif
 
 using terminate_handler = void (*)();
-_LIBCPP_FUNC_VIS terminate_handler set_terminate(terminate_handler) _NOEXCEPT;
-_LIBCPP_FUNC_VIS terminate_handler get_terminate() _NOEXCEPT;
+_LIBCPP_EXPORTED_FROM_ABI terminate_handler set_terminate(terminate_handler) _NOEXCEPT;
+_LIBCPP_EXPORTED_FROM_ABI terminate_handler get_terminate() _NOEXCEPT;
 
-_LIBCPP_FUNC_VIS bool uncaught_exception() _NOEXCEPT;
-_LIBCPP_FUNC_VIS _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS int uncaught_exceptions() _NOEXCEPT;
+_LIBCPP_EXPORTED_FROM_ABI bool uncaught_exception() _NOEXCEPT;
+_LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS int uncaught_exceptions() _NOEXCEPT;
 
-class _LIBCPP_TYPE_VIS exception_ptr;
+class _LIBCPP_EXPORTED_FROM_ABI exception_ptr;
 
-_LIBCPP_FUNC_VIS exception_ptr current_exception() _NOEXCEPT;
-_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void rethrow_exception(exception_ptr);
+_LIBCPP_EXPORTED_FROM_ABI exception_ptr current_exception() _NOEXCEPT;
+_LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void rethrow_exception(exception_ptr);
 } // namespace std
 
 #endif // _LIBCPP___EXCEPTION_OPERATIONS_H

diff  --git a/libcxx/include/__exception/terminate.h b/libcxx/include/__exception/terminate.h
index d8dd9642b88d1..e672471dc5263 100644
--- a/libcxx/include/__exception/terminate.h
+++ b/libcxx/include/__exception/terminate.h
@@ -16,7 +16,7 @@
 #endif
 
 namespace std { // purposefully not using versioning namespace
-_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void terminate() _NOEXCEPT;
+_LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void terminate() _NOEXCEPT;
 } // namespace std
 
 #endif // _LIBCPP___EXCEPTION_TERMINATE_H

diff  --git a/libcxx/include/__filesystem/directory_entry.h b/libcxx/include/__filesystem/directory_entry.h
index 0fa958b3aacba..2086d8214cbb7 100644
--- a/libcxx/include/__filesystem/directory_entry.h
+++ b/libcxx/include/__filesystem/directory_entry.h
@@ -322,8 +322,7 @@ class directory_entry {
     __data_ = __dt;
   }
 
-  _LIBCPP_FUNC_VIS
-  error_code __do_refresh() noexcept;
+  _LIBCPP_EXPORTED_FROM_ABI error_code __do_refresh() noexcept;
 
   _LIBCPP_INLINE_VISIBILITY
   static bool __is_dne_error(error_code const& __ec) {

diff  --git a/libcxx/include/__filesystem/directory_iterator.h b/libcxx/include/__filesystem/directory_iterator.h
index 708f77a8642f2..2bf17179095f3 100644
--- a/libcxx/include/__filesystem/directory_iterator.h
+++ b/libcxx/include/__filesystem/directory_iterator.h
@@ -108,15 +108,11 @@ class directory_iterator {
              const directory_iterator& __rhs) noexcept;
 
   // construct the dir_stream
-  _LIBCPP_FUNC_VIS
-  directory_iterator(const path&, error_code*,
-                     directory_options = directory_options::none);
+  _LIBCPP_EXPORTED_FROM_ABI directory_iterator(const path&, error_code*, directory_options = directory_options::none);
 
-  _LIBCPP_FUNC_VIS
-  directory_iterator& __increment(error_code* __ec = nullptr);
+  _LIBCPP_EXPORTED_FROM_ABI directory_iterator& __increment(error_code* __ec = nullptr);
 
-  _LIBCPP_FUNC_VIS
-  const directory_entry& __dereference() const;
+  _LIBCPP_EXPORTED_FROM_ABI const directory_entry& __dereference() const;
 
 private:
   shared_ptr<__dir_stream> __imp_;

diff  --git a/libcxx/include/__filesystem/file_status.h b/libcxx/include/__filesystem/file_status.h
index 659f812516741..47e28b4155fc5 100644
--- a/libcxx/include/__filesystem/file_status.h
+++ b/libcxx/include/__filesystem/file_status.h
@@ -25,7 +25,7 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
 
 _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
 
-class _LIBCPP_TYPE_VIS file_status {
+class _LIBCPP_EXPORTED_FROM_ABI file_status {
 public:
   // constructors
   _LIBCPP_INLINE_VISIBILITY

diff  --git a/libcxx/include/__filesystem/filesystem_error.h b/libcxx/include/__filesystem/filesystem_error.h
index 028352dfaf897..07fd3223cbde3 100644
--- a/libcxx/include/__filesystem/filesystem_error.h
+++ b/libcxx/include/__filesystem/filesystem_error.h
@@ -30,7 +30,7 @@
 
 _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
 
-class _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_EXCEPTION_ABI filesystem_error : public system_error {
+class _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_EXPORTED_FROM_ABI filesystem_error : public system_error {
 public:
   _LIBCPP_INLINE_VISIBILITY
   filesystem_error(const string& __what, error_code __ec)

diff  --git a/libcxx/include/__filesystem/operations.h b/libcxx/include/__filesystem/operations.h
index 4e62521281f4b..85c8a8772ea6b 100644
--- a/libcxx/include/__filesystem/operations.h
+++ b/libcxx/include/__filesystem/operations.h
@@ -34,33 +34,33 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
 
 _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
 
-_LIBCPP_FUNC_VIS path __absolute(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS path __canonical(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS bool __copy_file(const path& __from, const path& __to, copy_options __opt, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __copy_symlink(const path& __existing_symlink, const path& __new_symlink, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __copy(const path& __from, const path& __to, copy_options __opt, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS bool __create_directories(const path&, error_code* = nullptr);
-_LIBCPP_FUNC_VIS void __create_directory_symlink(const path& __to, const path& __new_symlink, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS bool __create_directory(const path&, error_code* = nullptr);
-_LIBCPP_FUNC_VIS bool __create_directory(const path&, const path& __attributes, error_code* = nullptr);
-_LIBCPP_FUNC_VIS void __create_hard_link(const path& __to, const path& __new_hard_link, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __create_symlink(const path& __to, const path& __new_symlink, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS path __current_path(error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __current_path(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS bool __equivalent(const path&, const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS file_status __status(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS uintmax_t __file_size(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS uintmax_t __hard_link_count(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS file_status __symlink_status(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS file_time_type __last_write_time(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __last_write_time(const path&, file_time_type __new_time, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS path __weakly_canonical(path const& __p, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS path __read_symlink(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS uintmax_t __remove_all(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS bool __remove(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __rename(const path& __from, const path& __to, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __resize_file(const path&, uintmax_t __size, error_code* = nullptr);
-_LIBCPP_FUNC_VIS path __temp_directory_path(error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI path __absolute(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI path __canonical(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI bool __copy_file(const path& __from, const path& __to, copy_options __opt, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __copy_symlink(const path& __existing_symlink, const path& __new_symlink, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __copy(const path& __from, const path& __to, copy_options __opt, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI bool __create_directories(const path&, error_code* = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __create_directory_symlink(const path& __to, const path& __new_symlink, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI bool __create_directory(const path&, error_code* = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI bool __create_directory(const path&, const path& __attributes, error_code* = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __create_hard_link(const path& __to, const path& __new_hard_link, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __create_symlink(const path& __to, const path& __new_symlink, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI path __current_path(error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __current_path(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI bool __equivalent(const path&, const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI file_status __status(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI uintmax_t __file_size(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI uintmax_t __hard_link_count(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI file_status __symlink_status(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI file_time_type __last_write_time(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __last_write_time(const path&, file_time_type __new_time, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI path __weakly_canonical(path const& __p, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI path __read_symlink(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI uintmax_t __remove_all(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI bool __remove(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __rename(const path& __from, const path& __to, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __resize_file(const path&, uintmax_t __size, error_code* = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI path __temp_directory_path(error_code* __ec = nullptr);
 
 inline _LIBCPP_HIDE_FROM_ABI path absolute(const path& __p) { return __absolute(__p); }
 inline _LIBCPP_HIDE_FROM_ABI path absolute(const path& __p, error_code& __ec) { return __absolute(__p, &__ec); }
@@ -118,7 +118,7 @@ inline _LIBCPP_HIDE_FROM_ABI bool is_character_file(const path& __p, error_code&
 inline _LIBCPP_HIDE_FROM_ABI bool is_directory(file_status __s) noexcept { return __s.type() == file_type::directory; }
 inline _LIBCPP_HIDE_FROM_ABI bool is_directory(const path& __p) { return is_directory(__status(__p)); }
 inline _LIBCPP_HIDE_FROM_ABI bool is_directory(const path& __p, error_code& __ec) noexcept { return is_directory(__status(__p, &__ec)); }
-_LIBCPP_FUNC_VIS bool __fs_is_empty(const path& __p, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI bool __fs_is_empty(const path& __p, error_code* __ec = nullptr);
 inline _LIBCPP_HIDE_FROM_ABI bool is_empty(const path& __p) { return __fs_is_empty(__p); }
 inline _LIBCPP_HIDE_FROM_ABI bool is_empty(const path& __p, error_code& __ec) { return __fs_is_empty(__p, &__ec); }
 inline _LIBCPP_HIDE_FROM_ABI bool is_fifo(file_status __s) noexcept { return __s.type() == file_type::fifo; }
@@ -140,7 +140,7 @@ inline _LIBCPP_HIDE_FROM_ABI file_time_type last_write_time(const path& __p) { r
 inline _LIBCPP_HIDE_FROM_ABI file_time_type last_write_time(const path& __p, error_code& __ec) noexcept { return __last_write_time(__p, &__ec); }
 inline _LIBCPP_HIDE_FROM_ABI void last_write_time(const path& __p, file_time_type __t) { __last_write_time(__p, __t); }
 inline _LIBCPP_HIDE_FROM_ABI void last_write_time(const path& __p, file_time_type __t, error_code& __ec) noexcept { __last_write_time(__p, __t, &__ec); }
-_LIBCPP_FUNC_VIS void __permissions(const path&, perms, perm_options, error_code* = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __permissions(const path&, perms, perm_options, error_code* = nullptr);
 inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, perm_options __opts = perm_options::replace) { __permissions(__p, __prms, __opts); }
 inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, error_code& __ec) noexcept { __permissions(__p, __prms, perm_options::replace, &__ec); }
 inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, perm_options __opts, error_code& __ec) { __permissions(__p, __prms, __opts, &__ec); }
@@ -180,7 +180,7 @@ inline _LIBCPP_HIDE_FROM_ABI void rename(const path& __from, const path& __to) {
 inline _LIBCPP_HIDE_FROM_ABI void rename(const path& __from, const path& __to, error_code& __ec) noexcept { return __rename(__from, __to, &__ec); }
 inline _LIBCPP_HIDE_FROM_ABI void resize_file(const path& __p, uintmax_t __ns) { return __resize_file(__p, __ns); }
 inline _LIBCPP_HIDE_FROM_ABI void resize_file(const path& __p, uintmax_t __ns, error_code& __ec) noexcept { return __resize_file(__p, __ns, &__ec); }
-_LIBCPP_FUNC_VIS space_info __space(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI space_info __space(const path&, error_code* __ec = nullptr);
 inline _LIBCPP_HIDE_FROM_ABI space_info space(const path& __p) { return __space(__p); }
 inline _LIBCPP_HIDE_FROM_ABI space_info space(const path& __p, error_code& __ec) noexcept { return __space(__p, &__ec); }
 inline _LIBCPP_HIDE_FROM_ABI file_status status(const path& __p) { return __status(__p); }

diff  --git a/libcxx/include/__filesystem/path.h b/libcxx/include/__filesystem/path.h
index 3da18ab08752a..da349af730564 100644
--- a/libcxx/include/__filesystem/path.h
+++ b/libcxx/include/__filesystem/path.h
@@ -222,10 +222,8 @@ typedef char __path_value;
 #endif
 
 #if defined(_LIBCPP_WIN32API)
-_LIBCPP_FUNC_VIS
-size_t __wide_to_char(const wstring&, char*, size_t);
-_LIBCPP_FUNC_VIS
-size_t __char_to_wide(const string&, wchar_t*, size_t);
+_LIBCPP_EXPORTED_FROM_ABI size_t __wide_to_char(const wstring&, char*, size_t);
+_LIBCPP_EXPORTED_FROM_ABI size_t __char_to_wide(const string&, wchar_t*, size_t);
 #endif
 
 template <class _ECharT>
@@ -444,7 +442,7 @@ struct _PathExport<char8_t> {
 #endif /* !_LIBCPP_HAS_NO_CHAR8_T */
 #endif /* _LIBCPP_WIN32API */
 
-class _LIBCPP_TYPE_VIS path {
+class _LIBCPP_EXPORTED_FROM_ABI path {
   template <class _SourceOrIter, class _Tp = path&>
   using _EnableIfPathable =
       typename enable_if<__is_pathable<_SourceOrIter>::value, _Tp>::type;
@@ -1034,7 +1032,7 @@ class _LIBCPP_TYPE_VIS path {
   }
 
   // iterators
-  class _LIBCPP_TYPE_VIS iterator;
+  class _LIBCPP_EXPORTED_FROM_ABI iterator;
   typedef iterator const_iterator;
 
   iterator begin() const;
@@ -1084,8 +1082,7 @@ inline _LIBCPP_HIDE_FROM_ABI void swap(path& __lhs, path& __rhs) noexcept {
   __lhs.swap(__rhs);
 }
 
-_LIBCPP_FUNC_VIS
-size_t hash_value(const path& __p) noexcept;
+_LIBCPP_EXPORTED_FROM_ABI size_t hash_value(const path& __p) noexcept;
 
 _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
 

diff  --git a/libcxx/include/__filesystem/path_iterator.h b/libcxx/include/__filesystem/path_iterator.h
index bc0a3dd0fc5f9..3d445df5915fb 100644
--- a/libcxx/include/__filesystem/path_iterator.h
+++ b/libcxx/include/__filesystem/path_iterator.h
@@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
 
 _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
 
-class _LIBCPP_TYPE_VIS path::iterator {
+class _LIBCPP_EXPORTED_FROM_ABI path::iterator {
 public:
   enum _ParserState : unsigned char {
     _Singular,

diff  --git a/libcxx/include/__filesystem/recursive_directory_iterator.h b/libcxx/include/__filesystem/recursive_directory_iterator.h
index 130a41f7d0eed..e3e50471e9598 100644
--- a/libcxx/include/__filesystem/recursive_directory_iterator.h
+++ b/libcxx/include/__filesystem/recursive_directory_iterator.h
@@ -99,8 +99,8 @@ class recursive_directory_iterator {
     return __increment(&__ec);
   }
 
-  _LIBCPP_FUNC_VIS directory_options options() const;
-  _LIBCPP_FUNC_VIS int depth() const;
+  _LIBCPP_EXPORTED_FROM_ABI directory_options options() const;
+  _LIBCPP_EXPORTED_FROM_ABI int depth() const;
 
   _LIBCPP_INLINE_VISIBILITY
   void pop() { __pop(); }
@@ -115,24 +115,12 @@ class recursive_directory_iterator {
   void disable_recursion_pending() { __rec_ = false; }
 
 private:
-  _LIBCPP_FUNC_VIS
-  recursive_directory_iterator(const path& __p, directory_options __opt,
-                               error_code* __ec);
-
-  _LIBCPP_FUNC_VIS
-  const directory_entry& __dereference() const;
-
-  _LIBCPP_FUNC_VIS
-  bool __try_recursion(error_code* __ec);
-
-  _LIBCPP_FUNC_VIS
-  void __advance(error_code* __ec = nullptr);
-
-  _LIBCPP_FUNC_VIS
-  recursive_directory_iterator& __increment(error_code* __ec = nullptr);
-
-  _LIBCPP_FUNC_VIS
-  void __pop(error_code* __ec = nullptr);
+  _LIBCPP_EXPORTED_FROM_ABI recursive_directory_iterator(const path& __p, directory_options __opt, error_code* __ec);
+  _LIBCPP_EXPORTED_FROM_ABI const directory_entry& __dereference() const;
+  _LIBCPP_EXPORTED_FROM_ABI bool __try_recursion(error_code* __ec);
+  _LIBCPP_EXPORTED_FROM_ABI void __advance(error_code* __ec = nullptr);
+  _LIBCPP_EXPORTED_FROM_ABI recursive_directory_iterator& __increment(error_code* __ec = nullptr);
+  _LIBCPP_EXPORTED_FROM_ABI void __pop(error_code* __ec = nullptr);
 
   inline _LIBCPP_INLINE_VISIBILITY friend bool
   operator==(const recursive_directory_iterator&,

diff  --git a/libcxx/include/__filesystem/space_info.h b/libcxx/include/__filesystem/space_info.h
index 2cbd785d4ae1a..e125813593090 100644
--- a/libcxx/include/__filesystem/space_info.h
+++ b/libcxx/include/__filesystem/space_info.h
@@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
 
 _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
 
-struct _LIBCPP_TYPE_VIS space_info {
+struct _LIBCPP_EXPORTED_FROM_ABI space_info {
   uintmax_t capacity;
   uintmax_t free;
   uintmax_t available;

diff  --git a/libcxx/include/__format/format_error.h b/libcxx/include/__format/format_error.h
index 7fb4dd0d7a47d..5faea1ce0316d 100644
--- a/libcxx/include/__format/format_error.h
+++ b/libcxx/include/__format/format_error.h
@@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 _LIBCPP_DIAGNOSTIC_PUSH
 _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wweak-vtables")
-class _LIBCPP_EXCEPTION_ABI format_error : public runtime_error {
+class _LIBCPP_EXPORTED_FROM_ABI format_error : public runtime_error {
 public:
   _LIBCPP_HIDE_FROM_ABI explicit format_error(const string& __s)
       : runtime_error(__s) {}

diff  --git a/libcxx/include/__format/formatter_output.h b/libcxx/include/__format/formatter_output.h
index 6263dba098ebd..2a26ce88ca992 100644
--- a/libcxx/include/__format/formatter_output.h
+++ b/libcxx/include/__format/formatter_output.h
@@ -65,7 +65,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr char __hex_to_upper(char __c) {
   return __c;
 }
 
-struct _LIBCPP_TYPE_VIS __padding_size_result {
+struct _LIBCPP_EXPORTED_FROM_ABI __padding_size_result {
   size_t __before_;
   size_t __after_;
 };

diff  --git a/libcxx/include/__functional/bind.h b/libcxx/include/__functional/bind.h
index b0c9bfe78cc79..398cb3dc3480f 100644
--- a/libcxx/include/__functional/bind.h
+++ b/libcxx/include/__functional/bind.h
@@ -62,16 +62,16 @@ template <int _Np> struct __ph {};
 //
 // In practice, since placeholders are empty, `extern const` is almost impossible
 // to distinguish from `inline constexpr` from a usage stand point.
-_LIBCPP_FUNC_VIS extern const __ph<1>   _1;
-_LIBCPP_FUNC_VIS extern const __ph<2>   _2;
-_LIBCPP_FUNC_VIS extern const __ph<3>   _3;
-_LIBCPP_FUNC_VIS extern const __ph<4>   _4;
-_LIBCPP_FUNC_VIS extern const __ph<5>   _5;
-_LIBCPP_FUNC_VIS extern const __ph<6>   _6;
-_LIBCPP_FUNC_VIS extern const __ph<7>   _7;
-_LIBCPP_FUNC_VIS extern const __ph<8>   _8;
-_LIBCPP_FUNC_VIS extern const __ph<9>   _9;
-_LIBCPP_FUNC_VIS extern const __ph<10> _10;
+_LIBCPP_EXPORTED_FROM_ABI extern const __ph<1>   _1;
+_LIBCPP_EXPORTED_FROM_ABI extern const __ph<2>   _2;
+_LIBCPP_EXPORTED_FROM_ABI extern const __ph<3>   _3;
+_LIBCPP_EXPORTED_FROM_ABI extern const __ph<4>   _4;
+_LIBCPP_EXPORTED_FROM_ABI extern const __ph<5>   _5;
+_LIBCPP_EXPORTED_FROM_ABI extern const __ph<6>   _6;
+_LIBCPP_EXPORTED_FROM_ABI extern const __ph<7>   _7;
+_LIBCPP_EXPORTED_FROM_ABI extern const __ph<8>   _8;
+_LIBCPP_EXPORTED_FROM_ABI extern const __ph<9>   _9;
+_LIBCPP_EXPORTED_FROM_ABI extern const __ph<10> _10;
 
 } // namespace placeholders
 

diff  --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h
index ae7116b04ef8b..30582ce28843d 100644
--- a/libcxx/include/__functional/function.h
+++ b/libcxx/include/__functional/function.h
@@ -53,7 +53,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 _LIBCPP_DIAGNOSTIC_PUSH
 _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wweak-vtables")
-class _LIBCPP_EXCEPTION_ABI bad_function_call
+class _LIBCPP_EXPORTED_FROM_ABI bad_function_call
     : public exception
 {
 public:

diff  --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table
index 570e8209cbddf..78ace76e4a1b1 100644
--- a/libcxx/include/__hash_table
+++ b/libcxx/include/__hash_table
@@ -72,8 +72,7 @@ struct __is_hash_value_type : false_type {};
 template <class _One>
 struct __is_hash_value_type<_One> : __is_hash_value_type_imp<__remove_cvref_t<_One> > {};
 
-_LIBCPP_FUNC_VIS
-size_t __next_prime(size_t __n);
+_LIBCPP_EXPORTED_FROM_ABI size_t __next_prime(size_t __n);
 
 template <class _NodePtr>
 struct __hash_node_base

diff  --git a/libcxx/include/__locale b/libcxx/include/__locale
index e3b0085397d22..c138510f97f4f 100644
--- a/libcxx/include/__locale
+++ b/libcxx/include/__locale
@@ -57,7 +57,7 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_TYPE_VIS locale;
+class _LIBCPP_EXPORTED_FROM_ABI locale;
 
 template <class _Facet>
 _LIBCPP_INLINE_VISIBILITY
@@ -69,12 +69,12 @@ _LIBCPP_INLINE_VISIBILITY
 const _Facet&
 use_facet(const locale&);
 
-class _LIBCPP_TYPE_VIS locale
+class _LIBCPP_EXPORTED_FROM_ABI locale
 {
 public:
     // types:
-    class _LIBCPP_TYPE_VIS facet;
-    class _LIBCPP_TYPE_VIS id;
+    class _LIBCPP_EXPORTED_FROM_ABI facet;
+    class _LIBCPP_EXPORTED_FROM_ABI id;
 
     typedef int category;
     _LIBCPP_AVAILABILITY_LOCALE_CATEGORY
@@ -135,7 +135,7 @@ private:
     template <class _Facet> friend const _Facet& use_facet(const locale&);
 };
 
-class _LIBCPP_TYPE_VIS locale::facet
+class _LIBCPP_EXPORTED_FROM_ABI locale::facet
     : public __shared_count
 {
 protected:
@@ -151,7 +151,7 @@ private:
     void __on_zero_shared() _NOEXCEPT override;
 };
 
-class _LIBCPP_TYPE_VIS locale::id
+class _LIBCPP_EXPORTED_FROM_ABI locale::id
 {
     once_flag      __flag_;
     int32_t        __id_;
@@ -299,7 +299,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS collate<wchar_t>;
 template <class _CharT> class _LIBCPP_TEMPLATE_VIS collate_byname;
 
 template <>
-class _LIBCPP_TYPE_VIS collate_byname<char>
+class _LIBCPP_EXPORTED_FROM_ABI collate_byname<char>
     : public collate<char>
 {
     locale_t __l_;
@@ -319,7 +319,7 @@ protected:
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
 template <>
-class _LIBCPP_TYPE_VIS collate_byname<wchar_t>
+class _LIBCPP_EXPORTED_FROM_ABI collate_byname<wchar_t>
     : public collate<wchar_t>
 {
     locale_t __l_;
@@ -351,7 +351,7 @@ locale::operator()(const basic_string<_CharT, _Traits, _Allocator>& __x,
 
 // template <class charT> class ctype
 
-class _LIBCPP_TYPE_VIS ctype_base
+class _LIBCPP_EXPORTED_FROM_ABI ctype_base
 {
 public:
 #if defined(_LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE)
@@ -507,7 +507,7 @@ template <class _CharT> class _LIBCPP_TEMPLATE_VIS ctype;
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
 template <>
-class _LIBCPP_TYPE_VIS ctype<wchar_t>
+class _LIBCPP_EXPORTED_FROM_ABI ctype<wchar_t>
     : public locale::facet,
       public ctype_base
 {
@@ -610,7 +610,7 @@ protected:
 #endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
 
 template <>
-class _LIBCPP_TYPE_VIS ctype<char>
+class _LIBCPP_EXPORTED_FROM_ABI ctype<char>
     : public locale::facet, public ctype_base
 {
     const mask* __tab_;
@@ -739,7 +739,7 @@ protected:
 template <class _CharT> class _LIBCPP_TEMPLATE_VIS ctype_byname;
 
 template <>
-class _LIBCPP_TYPE_VIS ctype_byname<char>
+class _LIBCPP_EXPORTED_FROM_ABI ctype_byname<char>
     : public ctype<char>
 {
     locale_t __l_;
@@ -758,7 +758,7 @@ protected:
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
 template <>
-class _LIBCPP_TYPE_VIS ctype_byname<wchar_t>
+class _LIBCPP_EXPORTED_FROM_ABI ctype_byname<wchar_t>
     : public ctype<wchar_t>
 {
     locale_t __l_;
@@ -895,7 +895,7 @@ tolower(_CharT __c, const locale& __loc)
 
 // codecvt_base
 
-class _LIBCPP_TYPE_VIS codecvt_base
+class _LIBCPP_EXPORTED_FROM_ABI codecvt_base
 {
 public:
     _LIBCPP_INLINE_VISIBILITY codecvt_base() {}
@@ -909,7 +909,7 @@ template <class _InternT, class _ExternT, class _StateT> class _LIBCPP_TEMPLATE_
 // template <> class codecvt<char, char, mbstate_t>
 
 template <>
-class _LIBCPP_TYPE_VIS codecvt<char, char, mbstate_t>
+class _LIBCPP_EXPORTED_FROM_ABI codecvt<char, char, mbstate_t>
     : public locale::facet,
       public codecvt_base
 {
@@ -996,7 +996,7 @@ protected:
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
 template <>
-class _LIBCPP_TYPE_VIS codecvt<wchar_t, char, mbstate_t>
+class _LIBCPP_EXPORTED_FROM_ABI codecvt<wchar_t, char, mbstate_t>
     : public locale::facet,
       public codecvt_base
 {
@@ -1080,7 +1080,7 @@ protected:
 // template <> class codecvt<char16_t, char, mbstate_t> // deprecated in C++20
 
 template <>
-class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_TYPE_VIS codecvt<char16_t, char, mbstate_t>
+class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXPORTED_FROM_ABI codecvt<char16_t, char, mbstate_t>
     : public locale::facet,
       public codecvt_base
 {
@@ -1168,7 +1168,7 @@ protected:
 // template <> class codecvt<char16_t, char8_t, mbstate_t> // C++20
 
 template <>
-class _LIBCPP_TYPE_VIS codecvt<char16_t, char8_t, mbstate_t>
+class _LIBCPP_EXPORTED_FROM_ABI codecvt<char16_t, char8_t, mbstate_t>
     : public locale::facet,
       public codecvt_base
 {
@@ -1256,7 +1256,7 @@ protected:
 // template <> class codecvt<char32_t, char, mbstate_t> // deprecated in C++20
 
 template <>
-class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_TYPE_VIS codecvt<char32_t, char, mbstate_t>
+class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXPORTED_FROM_ABI codecvt<char32_t, char, mbstate_t>
     : public locale::facet,
       public codecvt_base
 {
@@ -1344,7 +1344,7 @@ protected:
 // template <> class codecvt<char32_t, char8_t, mbstate_t> // C++20
 
 template <>
-class _LIBCPP_TYPE_VIS codecvt<char32_t, char8_t, mbstate_t>
+class _LIBCPP_EXPORTED_FROM_ABI codecvt<char32_t, char8_t, mbstate_t>
     : public locale::facet,
       public codecvt_base
 {
@@ -1488,7 +1488,7 @@ struct __narrow_to_utf8<8>
 
 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
 template <>
-struct _LIBCPP_TYPE_VIS __narrow_to_utf8<16>
+struct _LIBCPP_EXPORTED_FROM_ABI __narrow_to_utf8<16>
     : public codecvt<char16_t, char, mbstate_t>
 {
     _LIBCPP_INLINE_VISIBILITY
@@ -1524,7 +1524,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
 
 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
 template <>
-struct _LIBCPP_TYPE_VIS __narrow_to_utf8<32>
+struct _LIBCPP_EXPORTED_FROM_ABI __narrow_to_utf8<32>
     : public codecvt<char32_t, char, mbstate_t>
 {
     _LIBCPP_INLINE_VISIBILITY
@@ -1582,7 +1582,7 @@ struct __widen_from_utf8<8>
 
 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
 template <>
-struct _LIBCPP_TYPE_VIS __widen_from_utf8<16>
+struct _LIBCPP_EXPORTED_FROM_ABI __widen_from_utf8<16>
     : public codecvt<char16_t, char, mbstate_t>
 {
     _LIBCPP_INLINE_VISIBILITY
@@ -1618,7 +1618,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
 
 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
 template <>
-struct _LIBCPP_TYPE_VIS __widen_from_utf8<32>
+struct _LIBCPP_EXPORTED_FROM_ABI __widen_from_utf8<32>
     : public codecvt<char32_t, char, mbstate_t>
 {
     _LIBCPP_INLINE_VISIBILITY
@@ -1657,7 +1657,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
 template <class _CharT> class _LIBCPP_TEMPLATE_VIS numpunct;
 
 template <>
-class _LIBCPP_TYPE_VIS numpunct<char>
+class _LIBCPP_EXPORTED_FROM_ABI numpunct<char>
     : public locale::facet
 {
 public:
@@ -1689,7 +1689,7 @@ protected:
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
 template <>
-class _LIBCPP_TYPE_VIS numpunct<wchar_t>
+class _LIBCPP_EXPORTED_FROM_ABI numpunct<wchar_t>
     : public locale::facet
 {
 public:
@@ -1725,7 +1725,7 @@ protected:
 template <class _CharT> class _LIBCPP_TEMPLATE_VIS numpunct_byname;
 
 template <>
-class _LIBCPP_TYPE_VIS numpunct_byname<char>
+class _LIBCPP_EXPORTED_FROM_ABI numpunct_byname<char>
 : public numpunct<char>
 {
 public:
@@ -1744,7 +1744,7 @@ private:
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
 template <>
-class _LIBCPP_TYPE_VIS numpunct_byname<wchar_t>
+class _LIBCPP_EXPORTED_FROM_ABI numpunct_byname<wchar_t>
 : public numpunct<wchar_t>
 {
 public:

diff  --git a/libcxx/include/__memory/align.h b/libcxx/include/__memory/align.h
index c6792206b075a..bbb995f4a8c8e 100644
--- a/libcxx/include/__memory/align.h
+++ b/libcxx/include/__memory/align.h
@@ -18,7 +18,7 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-_LIBCPP_FUNC_VIS void* align(size_t __align, size_t __sz, void*& __ptr, size_t& __space);
+_LIBCPP_EXPORTED_FROM_ABI void* align(size_t __align, size_t __sz, void*& __ptr, size_t& __space);
 
 _LIBCPP_END_NAMESPACE_STD
 

diff  --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h
index db8b67143f807..28f0260ff3fba 100644
--- a/libcxx/include/__memory/shared_ptr.h
+++ b/libcxx/include/__memory/shared_ptr.h
@@ -120,7 +120,7 @@ __libcpp_atomic_refcount_decrement(_Tp& __t) _NOEXCEPT
 #endif
 }
 
-class _LIBCPP_EXCEPTION_ABI bad_weak_ptr
+class _LIBCPP_EXPORTED_FROM_ABI bad_weak_ptr
     : public std::exception
 {
 public:
@@ -142,7 +142,7 @@ void __throw_bad_weak_ptr()
 
 template<class _Tp> class _LIBCPP_TEMPLATE_VIS weak_ptr;
 
-class _LIBCPP_TYPE_VIS __shared_count
+class _LIBCPP_EXPORTED_FROM_ABI __shared_count
 {
     __shared_count(const __shared_count&);
     __shared_count& operator=(const __shared_count&);
@@ -181,7 +181,7 @@ class _LIBCPP_TYPE_VIS __shared_count
     }
 };
 
-class _LIBCPP_TYPE_VIS __shared_weak_count
+class _LIBCPP_EXPORTED_FROM_ABI __shared_weak_count
     : private __shared_count
 {
     long __shared_weak_owners_;
@@ -1944,7 +1944,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p);
 
 #if !defined(_LIBCPP_HAS_NO_THREADS)
 
-class _LIBCPP_TYPE_VIS __sp_mut
+class _LIBCPP_EXPORTED_FROM_ABI __sp_mut
 {
     void* __lx_;
 public:
@@ -1956,10 +1956,10 @@ class _LIBCPP_TYPE_VIS __sp_mut
     __sp_mut(const __sp_mut&);
     __sp_mut& operator=(const __sp_mut&);
 
-    friend _LIBCPP_FUNC_VIS __sp_mut& __get_sp_mut(const void*);
+    friend _LIBCPP_EXPORTED_FROM_ABI __sp_mut& __get_sp_mut(const void*);
 };
 
-_LIBCPP_FUNC_VIS _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
+_LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
 __sp_mut& __get_sp_mut(const void*);
 
 template <class _Tp>

diff  --git a/libcxx/include/__memory_resource/memory_resource.h b/libcxx/include/__memory_resource/memory_resource.h
index 7753376d0c49a..db452a252c735 100644
--- a/libcxx/include/__memory_resource/memory_resource.h
+++ b/libcxx/include/__memory_resource/memory_resource.h
@@ -24,7 +24,7 @@ namespace pmr {
 
 // [mem.res.class]
 
-class _LIBCPP_TYPE_VIS memory_resource {
+class _LIBCPP_EXPORTED_FROM_ABI memory_resource {
   static const size_t __max_align = alignof(max_align_t);
 
 public:
@@ -65,10 +65,16 @@ inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const memory_resource& __lhs, const
 
 // [mem.res.global]
 
-[[__gnu__::__returns_nonnull__]] _LIBCPP_FUNC_VIS memory_resource* get_default_resource() noexcept;
-[[__gnu__::__returns_nonnull__]] _LIBCPP_FUNC_VIS memory_resource* set_default_resource(memory_resource*) noexcept;
-[[using __gnu__: __returns_nonnull__, __const__]] _LIBCPP_FUNC_VIS memory_resource* new_delete_resource() noexcept;
-[[using __gnu__: __returns_nonnull__, __const__]] _LIBCPP_FUNC_VIS memory_resource* null_memory_resource() noexcept;
+[[__gnu__::__returns_nonnull__]] _LIBCPP_EXPORTED_FROM_ABI memory_resource* get_default_resource() noexcept;
+
+[[__gnu__::__returns_nonnull__]] _LIBCPP_EXPORTED_FROM_ABI memory_resource*
+set_default_resource(memory_resource*) noexcept;
+
+[[using __gnu__: __returns_nonnull__, __const__]] _LIBCPP_EXPORTED_FROM_ABI memory_resource*
+new_delete_resource() noexcept;
+
+[[using __gnu__: __returns_nonnull__, __const__]] _LIBCPP_EXPORTED_FROM_ABI memory_resource*
+null_memory_resource() noexcept;
 
 } // namespace pmr
 

diff  --git a/libcxx/include/__memory_resource/monotonic_buffer_resource.h b/libcxx/include/__memory_resource/monotonic_buffer_resource.h
index f60d23e25b7b3..0a0565048ef60 100644
--- a/libcxx/include/__memory_resource/monotonic_buffer_resource.h
+++ b/libcxx/include/__memory_resource/monotonic_buffer_resource.h
@@ -26,7 +26,7 @@ namespace pmr {
 
 // [mem.res.monotonic.buffer]
 
-class _LIBCPP_TYPE_VIS monotonic_buffer_resource : public memory_resource {
+class _LIBCPP_EXPORTED_FROM_ABI monotonic_buffer_resource : public memory_resource {
   static const size_t __default_buffer_capacity  = 1024;
   static const size_t __default_buffer_alignment = 16;
 

diff  --git a/libcxx/include/__memory_resource/pool_options.h b/libcxx/include/__memory_resource/pool_options.h
index 6ddd89987e817..442959836c7ef 100644
--- a/libcxx/include/__memory_resource/pool_options.h
+++ b/libcxx/include/__memory_resource/pool_options.h
@@ -24,7 +24,7 @@ namespace pmr {
 
 // [mem.res.pool.options]
 
-struct _LIBCPP_TYPE_VIS pool_options {
+struct _LIBCPP_EXPORTED_FROM_ABI pool_options {
   size_t max_blocks_per_chunk        = 0;
   size_t largest_required_pool_block = 0;
 };

diff  --git a/libcxx/include/__memory_resource/synchronized_pool_resource.h b/libcxx/include/__memory_resource/synchronized_pool_resource.h
index cddcd3479aae5..c780164c41760 100644
--- a/libcxx/include/__memory_resource/synchronized_pool_resource.h
+++ b/libcxx/include/__memory_resource/synchronized_pool_resource.h
@@ -28,7 +28,7 @@ namespace pmr {
 
 // [mem.res.pool.overview]
 
-class _LIBCPP_TYPE_VIS synchronized_pool_resource : public memory_resource {
+class _LIBCPP_EXPORTED_FROM_ABI synchronized_pool_resource : public memory_resource {
 public:
   _LIBCPP_HIDE_FROM_ABI synchronized_pool_resource(const pool_options& __opts, memory_resource* __upstream)
       : __unsync_(__opts, __upstream) {}

diff  --git a/libcxx/include/__memory_resource/unsynchronized_pool_resource.h b/libcxx/include/__memory_resource/unsynchronized_pool_resource.h
index 26e4bdf6945e6..fcb2f2403ba65 100644
--- a/libcxx/include/__memory_resource/unsynchronized_pool_resource.h
+++ b/libcxx/include/__memory_resource/unsynchronized_pool_resource.h
@@ -27,7 +27,7 @@ namespace pmr {
 
 // [mem.res.pool.overview]
 
-class _LIBCPP_TYPE_VIS unsynchronized_pool_resource : public memory_resource {
+class _LIBCPP_EXPORTED_FROM_ABI unsynchronized_pool_resource : public memory_resource {
   class __fixed_pool;
 
   class __adhoc_pool {

diff  --git a/libcxx/include/__mutex/mutex.h b/libcxx/include/__mutex/mutex.h
index 819d4f37decb6..4423abf62b8b7 100644
--- a/libcxx/include/__mutex/mutex.h
+++ b/libcxx/include/__mutex/mutex.h
@@ -21,7 +21,7 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex {
+class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex {
   __libcpp_mutex_t __m_ = _LIBCPP_MUTEX_INITIALIZER;
 
 public:

diff  --git a/libcxx/include/__mutex/tag_types.h b/libcxx/include/__mutex/tag_types.h
index 5242fd6661569..05ccb8b23a6f4 100644
--- a/libcxx/include/__mutex/tag_types.h
+++ b/libcxx/include/__mutex/tag_types.h
@@ -19,15 +19,15 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-struct _LIBCPP_TYPE_VIS defer_lock_t {
+struct _LIBCPP_EXPORTED_FROM_ABI defer_lock_t {
   explicit defer_lock_t() = default;
 };
 
-struct _LIBCPP_TYPE_VIS try_to_lock_t {
+struct _LIBCPP_EXPORTED_FROM_ABI try_to_lock_t {
   explicit try_to_lock_t() = default;
 };
 
-struct _LIBCPP_TYPE_VIS adopt_lock_t {
+struct _LIBCPP_EXPORTED_FROM_ABI adopt_lock_t {
   explicit adopt_lock_t() = default;
 };
 

diff  --git a/libcxx/include/__random/random_device.h b/libcxx/include/__random/random_device.h
index e16afeafc7a85..e7c37241a72c8 100644
--- a/libcxx/include/__random/random_device.h
+++ b/libcxx/include/__random/random_device.h
@@ -23,7 +23,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #if !defined(_LIBCPP_HAS_NO_RANDOM_DEVICE)
 
-class _LIBCPP_TYPE_VIS random_device
+class _LIBCPP_EXPORTED_FROM_ABI random_device
 {
 #ifdef _LIBCPP_USING_DEV_RANDOM
     int __f_;

diff  --git a/libcxx/include/__string/extern_template_lists.h b/libcxx/include/__string/extern_template_lists.h
index edbda7cbd004f..41b71f342010a 100644
--- a/libcxx/include/__string/extern_template_lists.h
+++ b/libcxx/include/__string/extern_template_lists.h
@@ -28,104 +28,104 @@
 // functions supporting new c++ version / API changes. Typically entries
 // must never be removed from the stable list.
 #define _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_Func, _CharType) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(value_type const*, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, allocator<_CharType> const&)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_last_not_of(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::~basic_string()) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_first_not_of(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::operator=(value_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS const _CharType& basic_string<_CharType>::at(size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_first_of(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::reserve(size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(basic_string const&, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::copy(value_type*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, allocator<_CharType> const&)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_last_of(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__grow_by(size_type, size_type, size_type, size_type, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__grow_by_and_replace(size_type, size_type, size_type, size_type, size_type, size_type, value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::push_back(value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS const basic_string<_CharType>::size_type basic_string<_CharType>::npos) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::erase(size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(basic_string const&, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS int basic_string<_CharType>::compare(value_type const*) const) \
-  _Func(_LIBCPP_FUNC_VIS int basic_string<_CharType>::compare(size_type, size_type, value_type const*) const) \
-  _Func(_LIBCPP_FUNC_VIS _CharType& basic_string<_CharType>::at(size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS int basic_string<_CharType>::compare(size_type, size_type, basic_string const&, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS int basic_string<_CharType>::compare(size_type, size_type, value_type const*, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::operator=(basic_string const&)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, basic_string const&, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::iterator basic_string<_CharType>::insert(basic_string::const_iterator, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::resize(size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, basic_string const&, size_type, size_type))
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__init(value_type const*, size_type, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::basic_string(basic_string const&)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::basic_string(basic_string const&, allocator<_CharType> const&)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find_last_not_of(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::~basic_string()) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find_first_not_of(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::insert(size_type, size_type, value_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::operator=(value_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__init(value_type const*, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI const _CharType& basic_string<_CharType>::at(size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find_first_of(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, size_type, value_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::assign(value_type const*, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::reserve(size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::append(value_type const*, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::assign(basic_string const&, size_type, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::copy(value_type*, size_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, allocator<_CharType> const&)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__init(size_type, value_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find_last_of(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__grow_by(size_type, size_type, size_type, size_type, size_type, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__grow_by_and_replace(size_type, size_type, size_type, size_type, size_type, size_type, value_type const*)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::push_back(value_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::append(size_type, value_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI const basic_string<_CharType>::size_type basic_string<_CharType>::npos) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::assign(size_type, value_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::erase(size_type, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::append(basic_string const&, size_type, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI int basic_string<_CharType>::compare(value_type const*) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI int basic_string<_CharType>::compare(size_type, size_type, value_type const*) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI _CharType& basic_string<_CharType>::at(size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::assign(value_type const*)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI int basic_string<_CharType>::compare(size_type, size_type, basic_string const&, size_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI int basic_string<_CharType>::compare(size_type, size_type, value_type const*, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::operator=(basic_string const&)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::append(value_type const*)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, basic_string const&, size_type, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::iterator basic_string<_CharType>::insert(basic_string::const_iterator, value_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::resize(size_type, value_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::insert(size_type, basic_string const&, size_type, size_type))
 
 #define _LIBCPP_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST(_Func, _CharType) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(value_type const*, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_last_not_of(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::~basic_string()) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_first_not_of(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::operator=(value_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init_copy_ctor_external(value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS const _CharType& basic_string<_CharType>::at(size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_first_of(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::__assign_external(value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::__assign_external(value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::reserve(size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(basic_string const&, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::copy(value_type*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, allocator<_CharType> const&)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_last_of(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__grow_by(size_type, size_type, size_type, size_type, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__grow_by_and_replace(size_type, size_type, size_type, size_type, size_type, size_type, value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::__assign_no_alias<false>(value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::__assign_no_alias<true>(value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::push_back(value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS const basic_string<_CharType>::size_type basic_string<_CharType>::npos) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__erase_external_with_move(size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(basic_string const&, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS int basic_string<_CharType>::compare(value_type const*) const) \
-  _Func(_LIBCPP_FUNC_VIS int basic_string<_CharType>::compare(size_type, size_type, value_type const*) const) \
-  _Func(_LIBCPP_FUNC_VIS _CharType& basic_string<_CharType>::at(size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS int basic_string<_CharType>::compare(size_type, size_type, basic_string const&, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS int basic_string<_CharType>::compare(size_type, size_type, value_type const*, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, basic_string const&, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::iterator basic_string<_CharType>::insert(basic_string::const_iterator, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::resize(size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, basic_string const&, size_type, size_type))
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__init(value_type const*, size_type, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find_last_not_of(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::~basic_string()) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find_first_not_of(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::insert(size_type, size_type, value_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::operator=(value_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__init(value_type const*, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__init_copy_ctor_external(value_type const*, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI const _CharType& basic_string<_CharType>::at(size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find_first_of(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, size_type, value_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::__assign_external(value_type const*, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::__assign_external(value_type const*)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::reserve(size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::append(value_type const*, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::assign(basic_string const&, size_type, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::copy(value_type*, size_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, allocator<_CharType> const&)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__init(size_type, value_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find_last_of(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__grow_by(size_type, size_type, size_type, size_type, size_type, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__grow_by_and_replace(size_type, size_type, size_type, size_type, size_type, size_type, value_type const*)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::__assign_no_alias<false>(value_type const*, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::__assign_no_alias<true>(value_type const*, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::push_back(value_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::append(size_type, value_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI const basic_string<_CharType>::size_type basic_string<_CharType>::npos) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::assign(size_type, value_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::__erase_external_with_move(size_type, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::append(basic_string const&, size_type, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI int basic_string<_CharType>::compare(value_type const*) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI int basic_string<_CharType>::compare(size_type, size_type, value_type const*) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI _CharType& basic_string<_CharType>::at(size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI int basic_string<_CharType>::compare(size_type, size_type, basic_string const&, size_type, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI int basic_string<_CharType>::compare(size_type, size_type, value_type const*, size_type) const) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::append(value_type const*)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, basic_string const&, size_type, size_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>::iterator basic_string<_CharType>::insert(basic_string::const_iterator, value_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI void basic_string<_CharType>::resize(size_type, value_type)) \
+  _Func(_LIBCPP_EXPORTED_FROM_ABI basic_string<_CharType>& basic_string<_CharType>::insert(size_type, basic_string const&, size_type, size_type))
 
 
 #endif // _LIBCPP___STRING_EXTERN_TEMPLATE_LISTS_H

diff  --git a/libcxx/include/__support/win32/locale_win32.h b/libcxx/include/__support/win32/locale_win32.h
index b8908049e5bda..d40e80e344e68 100644
--- a/libcxx/include/__support/win32/locale_win32.h
+++ b/libcxx/include/__support/win32/locale_win32.h
@@ -221,8 +221,8 @@ decltype(MB_CUR_MAX) MB_CUR_MAX_L( locale_t __l );
 #define strtof_l _strtof_l
 #define strtold_l _strtold_l
 #else
-_LIBCPP_FUNC_VIS float strtof_l(const char*, char**, locale_t);
-_LIBCPP_FUNC_VIS long double strtold_l(const char*, char**, locale_t);
+_LIBCPP_EXPORTED_FROM_ABI float strtof_l(const char*, char**, locale_t);
+_LIBCPP_EXPORTED_FROM_ABI long double strtold_l(const char*, char**, locale_t);
 #endif
 inline _LIBCPP_HIDE_FROM_ABI int
 islower_l(int __c, _locale_t __loc)
@@ -256,7 +256,7 @@ isupper_l(int __c, _locale_t __loc)
 #define towupper_l _towupper_l
 #define towlower_l _towlower_l
 #if defined(__MINGW32__) && __MSVCRT_VERSION__ < 0x0800
-_LIBCPP_FUNC_VIS size_t strftime_l(char *ret, size_t n, const char *format,
+_LIBCPP_EXPORTED_FROM_ABI size_t strftime_l(char *ret, size_t n, const char *format,
                                    const struct tm *tm, locale_t loc);
 #else
 #define strftime_l _strftime_l
@@ -265,9 +265,9 @@ _LIBCPP_FUNC_VIS size_t strftime_l(char *ret, size_t n, const char *format,
 #define sprintf_l( __s, __l, __f, ... ) _sprintf_l( __s, __f, __l, __VA_ARGS__ )
 #define vsprintf_l( __s, __l, __f, ... ) _vsprintf_l( __s, __f, __l, __VA_ARGS__ )
 #define vsnprintf_l( __s, __n, __l, __f, ... ) _vsnprintf_l( __s, __n, __f, __l, __VA_ARGS__ )
-_LIBCPP_FUNC_VIS int snprintf_l(char *__ret, size_t __n, locale_t __loc, const char *__format, ...);
-_LIBCPP_FUNC_VIS int asprintf_l( char **__ret, locale_t __loc, const char *__format, ... );
-_LIBCPP_FUNC_VIS int vasprintf_l( char **__ret, locale_t __loc, const char *__format, va_list __ap );
+_LIBCPP_EXPORTED_FROM_ABI int snprintf_l(char *__ret, size_t __n, locale_t __loc, const char *__format, ...);
+_LIBCPP_EXPORTED_FROM_ABI int asprintf_l( char **__ret, locale_t __loc, const char *__format, ... );
+_LIBCPP_EXPORTED_FROM_ABI int vasprintf_l( char **__ret, locale_t __loc, const char *__format, va_list __ap );
 
 // not-so-pressing FIXME: use locale to determine blank characters
 inline int isblank_l( int __c, locale_t /*loc*/ )

diff  --git a/libcxx/include/__system_error/error_category.h b/libcxx/include/__system_error/error_category.h
index 47cc9e2302545..11c920e32657c 100644
--- a/libcxx/include/__system_error/error_category.h
+++ b/libcxx/include/__system_error/error_category.h
@@ -20,12 +20,12 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_TYPE_VIS error_condition;
-class _LIBCPP_TYPE_VIS error_code;
+class _LIBCPP_EXPORTED_FROM_ABI error_condition;
+class _LIBCPP_EXPORTED_FROM_ABI error_code;
 
 class _LIBCPP_HIDDEN __do_message;
 
-class _LIBCPP_TYPE_VIS error_category {
+class _LIBCPP_EXPORTED_FROM_ABI error_category {
 public:
   virtual ~error_category() _NOEXCEPT;
 
@@ -67,8 +67,8 @@ class _LIBCPP_HIDDEN __do_message : public error_category {
   string message(int __ev) const override;
 };
 
-_LIBCPP_FUNC_VIS const error_category& generic_category() _NOEXCEPT;
-_LIBCPP_FUNC_VIS const error_category& system_category() _NOEXCEPT;
+_LIBCPP_EXPORTED_FROM_ABI const error_category& generic_category() _NOEXCEPT;
+_LIBCPP_EXPORTED_FROM_ABI const error_category& system_category() _NOEXCEPT;
 
 _LIBCPP_END_NAMESPACE_STD
 

diff  --git a/libcxx/include/__system_error/error_code.h b/libcxx/include/__system_error/error_code.h
index 78abe5ac447b2..d05e68529faf8 100644
--- a/libcxx/include/__system_error/error_code.h
+++ b/libcxx/include/__system_error/error_code.h
@@ -40,7 +40,7 @@ namespace __adl_only {
 void make_error_code() = delete;
 } // namespace __adl_only
 
-class _LIBCPP_TYPE_VIS error_code {
+class _LIBCPP_EXPORTED_FROM_ABI error_code {
   int __val_;
   const error_category* __cat_;
 

diff  --git a/libcxx/include/__system_error/error_condition.h b/libcxx/include/__system_error/error_condition.h
index e3181d1350a82..80f349ca3e8b7 100644
--- a/libcxx/include/__system_error/error_condition.h
+++ b/libcxx/include/__system_error/error_condition.h
@@ -46,7 +46,7 @@ namespace __adl_only {
 void make_error_condition() = delete;
 } // namespace __adl_only
 
-class _LIBCPP_TYPE_VIS error_condition {
+class _LIBCPP_EXPORTED_FROM_ABI error_condition {
   int __val_;
   const error_category* __cat_;
 

diff  --git a/libcxx/include/__system_error/system_error.h b/libcxx/include/__system_error/system_error.h
index 13c5c24a8037e..bc829491a493f 100644
--- a/libcxx/include/__system_error/system_error.h
+++ b/libcxx/include/__system_error/system_error.h
@@ -22,7 +22,7 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_TYPE_VIS system_error : public runtime_error {
+class _LIBCPP_EXPORTED_FROM_ABI system_error : public runtime_error {
   error_code __ec_;
 
 public:
@@ -41,7 +41,7 @@ class _LIBCPP_TYPE_VIS system_error : public runtime_error {
   static string __init(const error_code&, string);
 };
 
-_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_system_error(int __ev, const char* __what_arg);
+_LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void __throw_system_error(int __ev, const char* __what_arg);
 
 _LIBCPP_END_NAMESPACE_STD
 

diff  --git a/libcxx/include/__threading_support b/libcxx/include/__threading_support
index 08dfd73c0a4d5..cc0e344d08f12 100644
--- a/libcxx/include/__threading_support
+++ b/libcxx/include/__threading_support
@@ -43,7 +43,7 @@
 #if defined(_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL) || \
     defined(_LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL) || \
     defined(_LIBCPP_HAS_THREAD_API_WIN32)
-#define _LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_FUNC_VIS
+#define _LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_EXPORTED_FROM_ABI
 #else
 #define _LIBCPP_THREAD_ABI_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
 #endif
@@ -592,8 +592,8 @@ int __libcpp_tls_set(__libcpp_tls_key __key, void *__p)
 
 #endif // !_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL || _LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL
 
-class _LIBCPP_TYPE_VIS thread;
-class _LIBCPP_TYPE_VIS __thread_id;
+class _LIBCPP_EXPORTED_FROM_ABI thread;
+class _LIBCPP_EXPORTED_FROM_ABI __thread_id;
 
 namespace this_thread
 {
@@ -646,7 +646,7 @@ private:
     _LIBCPP_HIDE_FROM_ABI friend __libcpp_thread_id __get_underlying_id(const __thread_id __id) { return __id.__id_; }
 
     friend __thread_id this_thread::get_id() _NOEXCEPT;
-    friend class _LIBCPP_TYPE_VIS thread;
+    friend class _LIBCPP_EXPORTED_FROM_ABI thread;
     friend struct _LIBCPP_TEMPLATE_VIS hash<__thread_id>;
 };
 

diff  --git a/libcxx/include/__tuple/sfinae_helpers.h b/libcxx/include/__tuple/sfinae_helpers.h
index 384e3ca5aaa66..2fffac9efda18 100644
--- a/libcxx/include/__tuple/sfinae_helpers.h
+++ b/libcxx/include/__tuple/sfinae_helpers.h
@@ -108,7 +108,7 @@ struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, tuple<_Tp...> >
     typedef _LIBCPP_NODEBUG typename tuple_element<_Ip, __tuple_types<_Tp...> >::type type;
 };
 
-struct _LIBCPP_TYPE_VIS __check_tuple_constructor_fail {
+struct _LIBCPP_EXPORTED_FROM_ABI __check_tuple_constructor_fail {
 
     static _LIBCPP_HIDE_FROM_ABI constexpr bool __enable_explicit_default() { return false; }
     static _LIBCPP_HIDE_FROM_ABI constexpr bool __enable_implicit_default() { return false; }

diff  --git a/libcxx/include/__utility/in_place.h b/libcxx/include/__utility/in_place.h
index ba8aa227f2e60..5b878529fb21a 100644
--- a/libcxx/include/__utility/in_place.h
+++ b/libcxx/include/__utility/in_place.h
@@ -21,7 +21,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #if _LIBCPP_STD_VER >= 17
 
-struct _LIBCPP_TYPE_VIS in_place_t {
+struct _LIBCPP_EXPORTED_FROM_ABI in_place_t {
   explicit in_place_t() = default;
 };
 inline constexpr in_place_t in_place{};

diff  --git a/libcxx/include/any b/libcxx/include/any
index e056444f83c98..5a4ec309fa6b5 100644
--- a/libcxx/include/any
+++ b/libcxx/include/any
@@ -116,7 +116,7 @@ namespace std {
 #endif
 
 namespace std {
-class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast
+class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast
 {
 public:
     const char* what() const _NOEXCEPT override;

diff  --git a/libcxx/include/codecvt b/libcxx/include/codecvt
index ce378c8d1c6b2..ef22bf0530635 100644
--- a/libcxx/include/codecvt
+++ b/libcxx/include/codecvt
@@ -78,7 +78,7 @@ template <class _Elem> class __codecvt_utf8;
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf8<wchar_t>
+class _LIBCPP_EXPORTED_FROM_ABI __codecvt_utf8<wchar_t>
     : public codecvt<wchar_t, char, mbstate_t>
 {
     unsigned long __maxcode_;
@@ -115,7 +115,7 @@ protected:
 
 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf8<char16_t>
+class _LIBCPP_EXPORTED_FROM_ABI __codecvt_utf8<char16_t>
     : public codecvt<char16_t, char, mbstate_t>
 {
     unsigned long __maxcode_;
@@ -149,7 +149,7 @@ protected:
 
 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf8<char32_t>
+class _LIBCPP_EXPORTED_FROM_ABI __codecvt_utf8<char32_t>
     : public codecvt<char32_t, char, mbstate_t>
 {
     unsigned long __maxcode_;
@@ -203,7 +203,7 @@ template <class _Elem, bool _LittleEndian> class __codecvt_utf16;
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf16<wchar_t, false>
+class _LIBCPP_EXPORTED_FROM_ABI __codecvt_utf16<wchar_t, false>
     : public codecvt<wchar_t, char, mbstate_t>
 {
     unsigned long __maxcode_;
@@ -239,7 +239,7 @@ protected:
 };
 
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf16<wchar_t, true>
+class _LIBCPP_EXPORTED_FROM_ABI __codecvt_utf16<wchar_t, true>
     : public codecvt<wchar_t, char, mbstate_t>
 {
     unsigned long __maxcode_;
@@ -276,7 +276,7 @@ protected:
 
 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf16<char16_t, false>
+class _LIBCPP_EXPORTED_FROM_ABI __codecvt_utf16<char16_t, false>
     : public codecvt<char16_t, char, mbstate_t>
 {
     unsigned long __maxcode_;
@@ -310,7 +310,7 @@ protected:
 
 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf16<char16_t, true>
+class _LIBCPP_EXPORTED_FROM_ABI __codecvt_utf16<char16_t, true>
     : public codecvt<char16_t, char, mbstate_t>
 {
     unsigned long __maxcode_;
@@ -344,7 +344,7 @@ protected:
 
 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf16<char32_t, false>
+class _LIBCPP_EXPORTED_FROM_ABI __codecvt_utf16<char32_t, false>
     : public codecvt<char32_t, char, mbstate_t>
 {
     unsigned long __maxcode_;
@@ -378,7 +378,7 @@ protected:
 
 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf16<char32_t, true>
+class _LIBCPP_EXPORTED_FROM_ABI __codecvt_utf16<char32_t, true>
     : public codecvt<char32_t, char, mbstate_t>
 {
     unsigned long __maxcode_;
@@ -432,7 +432,7 @@ template <class _Elem> class __codecvt_utf8_utf16;
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16<wchar_t>
+class _LIBCPP_EXPORTED_FROM_ABI __codecvt_utf8_utf16<wchar_t>
     : public codecvt<wchar_t, char, mbstate_t>
 {
     unsigned long __maxcode_;
@@ -469,7 +469,7 @@ protected:
 
 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16<char32_t>
+class _LIBCPP_EXPORTED_FROM_ABI __codecvt_utf8_utf16<char32_t>
     : public codecvt<char32_t, char, mbstate_t>
 {
     unsigned long __maxcode_;
@@ -503,7 +503,7 @@ protected:
 
 _LIBCPP_SUPPRESS_DEPRECATED_PUSH
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16<char16_t>
+class _LIBCPP_EXPORTED_FROM_ABI __codecvt_utf8_utf16<char16_t>
     : public codecvt<char16_t, char, mbstate_t>
 {
     unsigned long __maxcode_;

diff  --git a/libcxx/include/condition_variable b/libcxx/include/condition_variable
index 825114b68a123..ac44eb324816d 100644
--- a/libcxx/include/condition_variable
+++ b/libcxx/include/condition_variable
@@ -129,7 +129,7 @@ public:
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_TYPE_VIS condition_variable_any
+class _LIBCPP_EXPORTED_FROM_ABI condition_variable_any
 {
     condition_variable __cv_;
     shared_ptr<mutex>  __mut_;
@@ -269,8 +269,7 @@ condition_variable_any::wait_for(_Lock& __lock,
                       _VSTD::move(__pred));
 }
 
-_LIBCPP_FUNC_VIS
-void notify_all_at_thread_exit(condition_variable&, unique_lock<mutex>);
+_LIBCPP_EXPORTED_FROM_ABI void notify_all_at_thread_exit(condition_variable&, unique_lock<mutex>);
 
 _LIBCPP_END_NAMESPACE_STD
 

diff  --git a/libcxx/include/experimental/memory_resource b/libcxx/include/experimental/memory_resource
index 4dc9845dc1854..a939b73546e3b 100644
--- a/libcxx/include/experimental/memory_resource
+++ b/libcxx/include/experimental/memory_resource
@@ -100,7 +100,7 @@ size_t __aligned_allocation_size(size_t __s, size_t __a) _NOEXCEPT
 }
 
 // 8.5, memory.resource
-class _LIBCPP_DEPCREATED_MEMORY_RESOURCE("memory_resource") _LIBCPP_TYPE_VIS memory_resource
+class _LIBCPP_DEPCREATED_MEMORY_RESOURCE("memory_resource") _LIBCPP_EXPORTED_FROM_ABI memory_resource
 {
     static const size_t __max_align = _LIBCPP_ALIGNOF(max_align_t);
 
@@ -142,16 +142,16 @@ bool operator!=(memory_resource const & __lhs,
     return !(__lhs == __rhs);
 }
 
-_LIBCPP_DEPCREATED_MEMORY_RESOURCE("new_delete_resource()") _LIBCPP_FUNC_VIS
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("new_delete_resource()") _LIBCPP_EXPORTED_FROM_ABI
 memory_resource * new_delete_resource() _NOEXCEPT;
 
-_LIBCPP_DEPCREATED_MEMORY_RESOURCE("null_memory_resource()") _LIBCPP_FUNC_VIS
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("null_memory_resource()") _LIBCPP_EXPORTED_FROM_ABI
 memory_resource * null_memory_resource() _NOEXCEPT;
 
-_LIBCPP_DEPCREATED_MEMORY_RESOURCE("get_default_resource()") _LIBCPP_FUNC_VIS
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("get_default_resource()") _LIBCPP_EXPORTED_FROM_ABI
 memory_resource * get_default_resource() _NOEXCEPT;
 
-_LIBCPP_DEPCREATED_MEMORY_RESOURCE("set_default_resource()") _LIBCPP_FUNC_VIS
+_LIBCPP_DEPCREATED_MEMORY_RESOURCE("set_default_resource()") _LIBCPP_EXPORTED_FROM_ABI
 memory_resource * set_default_resource(memory_resource * __new_res) _NOEXCEPT;
 
 // 8.6, memory.polymorphic.allocator.class

diff  --git a/libcxx/include/future b/libcxx/include/future
index 1f17aae6b3fb5..d2d33e58a692b 100644
--- a/libcxx/include/future
+++ b/libcxx/include/future
@@ -499,8 +499,7 @@ _LIBCPP_DECLARE_STRONG_ENUM(future_status)
 };
 _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(future_status)
 
-_LIBCPP_FUNC_VIS
-const error_category& future_category() _NOEXCEPT;
+_LIBCPP_EXPORTED_FROM_ABI const error_category& future_category() _NOEXCEPT;
 
 inline _LIBCPP_INLINE_VISIBILITY
 error_code
@@ -516,7 +515,7 @@ make_error_condition(future_errc __e) _NOEXCEPT
     return error_condition(static_cast<int>(__e), future_category());
 }
 
-class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_FUTURE_ERROR future_error
+class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_FUTURE_ERROR future_error
     : public logic_error
 {
     error_code __ec_;
@@ -544,7 +543,7 @@ void __throw_future_error(future_errc __ev)
 #endif
 }
 
-class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE __assoc_sub_state
+class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_FUTURE __assoc_sub_state
     : public __shared_count
 {
 protected:
@@ -1220,7 +1219,7 @@ future<_Rp&>::get()
 }
 
 template <>
-class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE future<void>
+class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_FUTURE future<void>
 {
     __assoc_sub_state* __state_;
 
@@ -1559,7 +1558,7 @@ promise<_Rp&>::set_exception_at_thread_exit(exception_ptr __p)
 // promise<void>
 
 template <>
-class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE promise<void>
+class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_FUTURE promise<void>
 {
     __assoc_sub_state* __state_;
 
@@ -2378,7 +2377,7 @@ shared_future<_Rp&>::operator=(const shared_future& __rhs)
 }
 
 template <>
-class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE shared_future<void>
+class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_FUTURE shared_future<void>
 {
     __assoc_sub_state* __state_;
 

diff  --git a/libcxx/include/ios b/libcxx/include/ios
index 5464ba58f8a43..156f685564270 100644
--- a/libcxx/include/ios
+++ b/libcxx/include/ios
@@ -245,10 +245,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 typedef ptr
diff _t streamsize;
 
-class _LIBCPP_TYPE_VIS ios_base
+class _LIBCPP_EXPORTED_FROM_ABI ios_base
 {
 public:
-    class _LIBCPP_EXCEPTION_ABI failure;
+    class _LIBCPP_EXPORTED_FROM_ABI failure;
 
     typedef unsigned int fmtflags;
     static const fmtflags boolalpha   = 0x0001;
@@ -295,7 +295,7 @@ public:
     typedef _VSTD::streampos streampos;
 #endif
 
-    class _LIBCPP_TYPE_VIS Init;
+    class _LIBCPP_EXPORTED_FROM_ABI Init;
 
     // 27.5.2.2 fmtflags state:
     _LIBCPP_INLINE_VISIBILITY fmtflags flags() const;
@@ -424,8 +424,7 @@ template <>
 struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<io_errc::__lx> : public true_type { };
 #endif
 
-_LIBCPP_FUNC_VIS
-const error_category& iostream_category() _NOEXCEPT;
+_LIBCPP_EXPORTED_FROM_ABI const error_category& iostream_category() _NOEXCEPT;
 
 inline _LIBCPP_INLINE_VISIBILITY
 error_code
@@ -441,7 +440,7 @@ make_error_condition(io_errc __e) _NOEXCEPT
     return error_condition(static_cast<int>(__e), iostream_category());
 }
 
-class _LIBCPP_EXCEPTION_ABI ios_base::failure
+class _LIBCPP_EXPORTED_FROM_ABI ios_base::failure
     : public system_error
 {
 public:
@@ -460,7 +459,7 @@ void __throw_failure(char const* __msg) {
 #endif
 }
 
-class _LIBCPP_TYPE_VIS ios_base::Init
+class _LIBCPP_EXPORTED_FROM_ABI ios_base::Init
 {
 public:
     Init();

diff  --git a/libcxx/include/iosfwd b/libcxx/include/iosfwd
index e3cd9faa70b7b..ea1a8c0ec3721 100644
--- a/libcxx/include/iosfwd
+++ b/libcxx/include/iosfwd
@@ -112,7 +112,7 @@ using u32streampos = fpos<char_traits<char32_t>::state_type>;
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_TYPE_VIS ios_base;
+class _LIBCPP_EXPORTED_FROM_ABI ios_base;
 
 template <class _CharT, class _Traits = char_traits<_CharT> >
     class _LIBCPP_TEMPLATE_VIS istreambuf_iterator;

diff  --git a/libcxx/include/iostream b/libcxx/include/iostream
index d679d9932d7e8..568ce8caed6ef 100644
--- a/libcxx/include/iostream
+++ b/libcxx/include/iostream
@@ -51,16 +51,16 @@ extern wostream wclog;
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-extern _LIBCPP_FUNC_VIS istream cin;
-extern _LIBCPP_FUNC_VIS ostream cout;
-extern _LIBCPP_FUNC_VIS ostream cerr;
-extern _LIBCPP_FUNC_VIS ostream clog;
+extern _LIBCPP_EXPORTED_FROM_ABI istream cin;
+extern _LIBCPP_EXPORTED_FROM_ABI ostream cout;
+extern _LIBCPP_EXPORTED_FROM_ABI ostream cerr;
+extern _LIBCPP_EXPORTED_FROM_ABI ostream clog;
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern _LIBCPP_FUNC_VIS wistream wcin;
-extern _LIBCPP_FUNC_VIS wostream wcout;
-extern _LIBCPP_FUNC_VIS wostream wcerr;
-extern _LIBCPP_FUNC_VIS wostream wclog;
+extern _LIBCPP_EXPORTED_FROM_ABI wistream wcin;
+extern _LIBCPP_EXPORTED_FROM_ABI wostream wcout;
+extern _LIBCPP_EXPORTED_FROM_ABI wostream wcerr;
+extern _LIBCPP_EXPORTED_FROM_ABI wostream wclog;
 #endif
 
 _LIBCPP_END_NAMESPACE_STD

diff  --git a/libcxx/include/locale b/libcxx/include/locale
index bfe00608bf445..ef7b3ea985f52 100644
--- a/libcxx/include/locale
+++ b/libcxx/include/locale
@@ -247,7 +247,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 #else
 #  define _LIBCPP_GET_C_LOCALE __cloc()
    // Get the C locale object
-   _LIBCPP_FUNC_VIS locale_t __cloc();
+   _LIBCPP_EXPORTED_FROM_ABI  locale_t __cloc();
 #define __cloc_defined
 #endif
 
@@ -379,7 +379,7 @@ __scan_keyword(_InputIterator& __b, _InputIterator __e,
     return __kb;
 }
 
-struct _LIBCPP_TYPE_VIS __num_get_base
+struct _LIBCPP_EXPORTED_FROM_ABI __num_get_base
 {
     static const int __num_get_buf_sz = 40;
 
@@ -387,8 +387,7 @@ struct _LIBCPP_TYPE_VIS __num_get_base
     static const char __src[33];
 };
 
-_LIBCPP_FUNC_VIS
-void __check_grouping(const string& __grouping, unsigned* __g, unsigned* __g_end,
+_LIBCPP_EXPORTED_FROM_ABI void __check_grouping(const string& __grouping, unsigned* __g, unsigned* __g_end,
                       ios_base::iostate& __err);
 
 template <class _CharT>
@@ -1128,7 +1127,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_get<char>;
 extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_get<wchar_t>;
 #endif
 
-struct _LIBCPP_TYPE_VIS __num_put_base
+struct _LIBCPP_EXPORTED_FROM_ABI __num_put_base
 {
 protected:
     static void __format_int(char* __fmt, const char* __len, bool __signd,
@@ -1683,7 +1682,7 @@ __get_up_to_n_digits(_InputIterator& __b, _InputIterator __e,
     return __r;
 }
 
-class _LIBCPP_TYPE_VIS time_base
+class _LIBCPP_EXPORTED_FROM_ABI time_base
 {
 public:
     enum dateorder {no_order, dmy, mdy, ymd, ydm};
@@ -1707,22 +1706,22 @@ protected:
     ~__time_get_c_storage() {}
 };
 
-template <> _LIBCPP_FUNC_VIS const string* __time_get_c_storage<char>::__weeks() const;
-template <> _LIBCPP_FUNC_VIS const string* __time_get_c_storage<char>::__months() const;
-template <> _LIBCPP_FUNC_VIS const string* __time_get_c_storage<char>::__am_pm() const;
-template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage<char>::__c() const;
-template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage<char>::__r() const;
-template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage<char>::__x() const;
-template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage<char>::__X() const;
+template <> _LIBCPP_EXPORTED_FROM_ABI const string* __time_get_c_storage<char>::__weeks() const;
+template <> _LIBCPP_EXPORTED_FROM_ABI const string* __time_get_c_storage<char>::__months() const;
+template <> _LIBCPP_EXPORTED_FROM_ABI const string* __time_get_c_storage<char>::__am_pm() const;
+template <> _LIBCPP_EXPORTED_FROM_ABI const string& __time_get_c_storage<char>::__c() const;
+template <> _LIBCPP_EXPORTED_FROM_ABI const string& __time_get_c_storage<char>::__r() const;
+template <> _LIBCPP_EXPORTED_FROM_ABI const string& __time_get_c_storage<char>::__x() const;
+template <> _LIBCPP_EXPORTED_FROM_ABI const string& __time_get_c_storage<char>::__X() const;
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template <> _LIBCPP_FUNC_VIS const wstring* __time_get_c_storage<wchar_t>::__weeks() const;
-template <> _LIBCPP_FUNC_VIS const wstring* __time_get_c_storage<wchar_t>::__months() const;
-template <> _LIBCPP_FUNC_VIS const wstring* __time_get_c_storage<wchar_t>::__am_pm() const;
-template <> _LIBCPP_FUNC_VIS const wstring& __time_get_c_storage<wchar_t>::__c() const;
-template <> _LIBCPP_FUNC_VIS const wstring& __time_get_c_storage<wchar_t>::__r() const;
-template <> _LIBCPP_FUNC_VIS const wstring& __time_get_c_storage<wchar_t>::__x() const;
-template <> _LIBCPP_FUNC_VIS const wstring& __time_get_c_storage<wchar_t>::__X() const;
+template <> _LIBCPP_EXPORTED_FROM_ABI const wstring* __time_get_c_storage<wchar_t>::__weeks() const;
+template <> _LIBCPP_EXPORTED_FROM_ABI const wstring* __time_get_c_storage<wchar_t>::__months() const;
+template <> _LIBCPP_EXPORTED_FROM_ABI const wstring* __time_get_c_storage<wchar_t>::__am_pm() const;
+template <> _LIBCPP_EXPORTED_FROM_ABI const wstring& __time_get_c_storage<wchar_t>::__c() const;
+template <> _LIBCPP_EXPORTED_FROM_ABI const wstring& __time_get_c_storage<wchar_t>::__r() const;
+template <> _LIBCPP_EXPORTED_FROM_ABI const wstring& __time_get_c_storage<wchar_t>::__x() const;
+template <> _LIBCPP_EXPORTED_FROM_ABI const wstring& __time_get_c_storage<wchar_t>::__X() const;
 #endif
 
 template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
@@ -2339,7 +2338,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get<char>;
 extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get<wchar_t>;
 #endif
 
-class _LIBCPP_TYPE_VIS __time_get
+class _LIBCPP_EXPORTED_FROM_ABI __time_get
 {
 protected:
     locale_t __loc_;
@@ -2377,16 +2376,16 @@ private:
 };
 
 #define _LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION(_CharT) \
-template <> _LIBCPP_FUNC_VIS time_base::dateorder __time_get_storage<_CharT>::__do_date_order() const; \
-template <> _LIBCPP_FUNC_VIS __time_get_storage<_CharT>::__time_get_storage(const char*); \
-template <> _LIBCPP_FUNC_VIS __time_get_storage<_CharT>::__time_get_storage(const string&); \
-template <> _LIBCPP_FUNC_VIS void __time_get_storage<_CharT>::init(const ctype<_CharT>&); \
-template <> _LIBCPP_FUNC_VIS __time_get_storage<_CharT>::string_type __time_get_storage<_CharT>::__analyze(char, const ctype<_CharT>&); \
-extern template _LIBCPP_FUNC_VIS time_base::dateorder __time_get_storage<_CharT>::__do_date_order() const; \
-extern template _LIBCPP_FUNC_VIS __time_get_storage<_CharT>::__time_get_storage(const char*); \
-extern template _LIBCPP_FUNC_VIS __time_get_storage<_CharT>::__time_get_storage(const string&); \
-extern template _LIBCPP_FUNC_VIS void __time_get_storage<_CharT>::init(const ctype<_CharT>&); \
-extern template _LIBCPP_FUNC_VIS __time_get_storage<_CharT>::string_type __time_get_storage<_CharT>::__analyze(char, const ctype<_CharT>&); \
+template <> _LIBCPP_EXPORTED_FROM_ABI time_base::dateorder __time_get_storage<_CharT>::__do_date_order() const; \
+template <> _LIBCPP_EXPORTED_FROM_ABI __time_get_storage<_CharT>::__time_get_storage(const char*); \
+template <> _LIBCPP_EXPORTED_FROM_ABI __time_get_storage<_CharT>::__time_get_storage(const string&); \
+template <> _LIBCPP_EXPORTED_FROM_ABI void __time_get_storage<_CharT>::init(const ctype<_CharT>&); \
+template <> _LIBCPP_EXPORTED_FROM_ABI __time_get_storage<_CharT>::string_type __time_get_storage<_CharT>::__analyze(char, const ctype<_CharT>&); \
+extern template _LIBCPP_EXPORTED_FROM_ABI time_base::dateorder __time_get_storage<_CharT>::__do_date_order() const; \
+extern template _LIBCPP_EXPORTED_FROM_ABI __time_get_storage<_CharT>::__time_get_storage(const char*); \
+extern template _LIBCPP_EXPORTED_FROM_ABI __time_get_storage<_CharT>::__time_get_storage(const string&); \
+extern template _LIBCPP_EXPORTED_FROM_ABI void __time_get_storage<_CharT>::init(const ctype<_CharT>&); \
+extern template _LIBCPP_EXPORTED_FROM_ABI __time_get_storage<_CharT>::string_type __time_get_storage<_CharT>::__analyze(char, const ctype<_CharT>&); \
 /**/
 
 _LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION(char)
@@ -2434,7 +2433,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get_byname<char>;
 extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get_byname<wchar_t>;
 #endif
 
-class _LIBCPP_TYPE_VIS __time_put
+class _LIBCPP_EXPORTED_FROM_ABI __time_put
 {
     locale_t __loc_;
 protected:
@@ -2574,7 +2573,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put_byname<wchar_t>;
 
 // money_base
 
-class _LIBCPP_TYPE_VIS money_base
+class _LIBCPP_EXPORTED_FROM_ABI money_base
 {
 public:
     enum part {none, space, symbol, sign, value};
@@ -2688,14 +2687,14 @@ private:
     void init(const char*);
 };
 
-template<> _LIBCPP_FUNC_VIS void moneypunct_byname<char, false>::init(const char*);
-template<> _LIBCPP_FUNC_VIS void moneypunct_byname<char, true>::init(const char*);
+template<> _LIBCPP_EXPORTED_FROM_ABI void moneypunct_byname<char, false>::init(const char*);
+template<> _LIBCPP_EXPORTED_FROM_ABI void moneypunct_byname<char, true>::init(const char*);
 extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<char, false>;
 extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<char, true>;
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template<> _LIBCPP_FUNC_VIS void moneypunct_byname<wchar_t, false>::init(const char*);
-template<> _LIBCPP_FUNC_VIS void moneypunct_byname<wchar_t, true>::init(const char*);
+template<> _LIBCPP_EXPORTED_FROM_ABI void moneypunct_byname<wchar_t, false>::init(const char*);
+template<> _LIBCPP_EXPORTED_FROM_ABI void moneypunct_byname<wchar_t, true>::init(const char*);
 extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<wchar_t, false>;
 extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<wchar_t, true>;
 #endif
@@ -2812,7 +2811,7 @@ template <class _CharT, class _InputIterator>
 locale::id
 money_get<_CharT, _InputIterator>::id;
 
-_LIBCPP_FUNC_VIS void __do_nothing(void*);
+_LIBCPP_EXPORTED_FROM_ABI void __do_nothing(void*);
 
 template <class _Tp>
 _LIBCPP_HIDE_FROM_ABI
@@ -3459,7 +3458,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_put<wchar_t>;
 
 // messages
 
-class _LIBCPP_TYPE_VIS messages_base
+class _LIBCPP_EXPORTED_FROM_ABI messages_base
 {
 public:
     typedef ptr
diff _t catalog;

diff  --git a/libcxx/include/mutex b/libcxx/include/mutex
index 74945b975b722..a77d31f6e22b0 100644
--- a/libcxx/include/mutex
+++ b/libcxx/include/mutex
@@ -216,7 +216,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #ifndef _LIBCPP_HAS_NO_THREADS
 
-class _LIBCPP_TYPE_VIS recursive_mutex
+class _LIBCPP_EXPORTED_FROM_ABI recursive_mutex
 {
     __libcpp_recursive_mutex_t __m_;
 
@@ -237,7 +237,7 @@ public:
     native_handle_type native_handle() {return &__m_;}
 };
 
-class _LIBCPP_TYPE_VIS timed_mutex
+class _LIBCPP_EXPORTED_FROM_ABI timed_mutex
 {
     mutex              __m_;
     condition_variable __cv_;
@@ -279,7 +279,7 @@ timed_mutex::try_lock_until(const chrono::time_point<_Clock, _Duration>& __t)
     return false;
 }
 
-class _LIBCPP_TYPE_VIS recursive_timed_mutex
+class _LIBCPP_EXPORTED_FROM_ABI recursive_timed_mutex
 {
     mutex              __m_;
     condition_variable __cv_;
@@ -658,8 +658,7 @@ __call_once_proxy(void* __vp)
     (*__p)();
 }
 
-_LIBCPP_FUNC_VIS void __call_once(volatile once_flag::_State_type&, void*,
-                                  void (*)(void*));
+_LIBCPP_EXPORTED_FROM_ABI void __call_once(volatile once_flag::_State_type&, void*, void (*)(void*));
 
 #ifndef _LIBCPP_CXX03_LANG
 

diff  --git a/libcxx/include/new b/libcxx/include/new
index af396cd4b8eb8..3064a0e2f0808 100644
--- a/libcxx/include/new
+++ b/libcxx/include/new
@@ -125,10 +125,10 @@ namespace std  // purposefully not using versioning namespace
 {
 
 #if !defined(_LIBCPP_ABI_VCRUNTIME)
-struct _LIBCPP_TYPE_VIS nothrow_t { explicit nothrow_t() = default; };
-extern _LIBCPP_FUNC_VIS const nothrow_t nothrow;
+struct _LIBCPP_EXPORTED_FROM_ABI nothrow_t { explicit nothrow_t() = default; };
+extern _LIBCPP_EXPORTED_FROM_ABI const nothrow_t nothrow;
 
-class _LIBCPP_EXCEPTION_ABI bad_alloc
+class _LIBCPP_EXPORTED_FROM_ABI bad_alloc
     : public exception
 {
 public:
@@ -137,7 +137,7 @@ public:
     const char* what() const _NOEXCEPT override;
 };
 
-class _LIBCPP_EXCEPTION_ABI bad_array_new_length
+class _LIBCPP_EXPORTED_FROM_ABI bad_array_new_length
     : public bad_alloc
 {
 public:
@@ -147,8 +147,8 @@ public:
 };
 
 typedef void (*new_handler)();
-_LIBCPP_FUNC_VIS new_handler set_new_handler(new_handler) _NOEXCEPT;
-_LIBCPP_FUNC_VIS new_handler get_new_handler() _NOEXCEPT;
+_LIBCPP_EXPORTED_FROM_ABI new_handler set_new_handler(new_handler) _NOEXCEPT;
+_LIBCPP_EXPORTED_FROM_ABI new_handler get_new_handler() _NOEXCEPT;
 
 #elif defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS == 0 // !_LIBCPP_ABI_VCRUNTIME
 
@@ -170,7 +170,7 @@ public:
 };
 #endif // defined(_LIBCPP_ABI_VCRUNTIME) && defined(_HAS_EXCEPTIONS) && _HAS_EXCEPTIONS == 0
 
-_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_bad_alloc();  // not in C++ spec
+_LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void __throw_bad_alloc();  // not in C++ spec
 
 _LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
 void __throw_bad_array_new_length()

diff  --git a/libcxx/include/optional b/libcxx/include/optional
index 68fb4c914eec4..18c47326c7882 100644
--- a/libcxx/include/optional
+++ b/libcxx/include/optional
@@ -242,7 +242,7 @@ namespace std {
 namespace std  // purposefully not using versioning namespace
 {
 
-class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
+class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
     : public exception
 {
 public:

diff  --git a/libcxx/include/regex b/libcxx/include/regex
index 7b31bf4f9af78..b4545580163ba 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -1020,7 +1020,7 @@ enum error_type
 
 } // namespace regex_constants
 
-class _LIBCPP_EXCEPTION_ABI regex_error
+class _LIBCPP_EXPORTED_FROM_ABI regex_error
     : public runtime_error
 {
     regex_constants::error_type __code_;
@@ -1245,7 +1245,7 @@ regex_traits<_CharT>::__transform_primary(_ForwardIterator __f,
 
 // lookup_collatename is very FreeBSD-specific
 
-_LIBCPP_FUNC_VIS string __get_collation_name(const char* __s);
+_LIBCPP_EXPORTED_FROM_ABI string __get_collation_name(const char* __s);
 
 template <class _CharT>
 template <class _ForwardIterator>
@@ -1308,8 +1308,7 @@ regex_traits<_CharT>::__lookup_collatename(_ForwardIterator __f,
 
 // lookup_classname
 
-regex_traits<char>::char_class_type _LIBCPP_FUNC_VIS
-__get_classname(const char* __s, bool __icase);
+regex_traits<char>::char_class_type _LIBCPP_EXPORTED_FROM_ABI __get_classname(const char* __s, bool __icase);
 
 template <class _CharT>
 template <class _ForwardIterator>
@@ -2225,9 +2224,9 @@ public:
     void __exec(__state&) const override;
 };
 
-template <> _LIBCPP_FUNC_VIS void __match_any_but_newline<char>::__exec(__state&) const;
+template <> _LIBCPP_EXPORTED_FROM_ABI void __match_any_but_newline<char>::__exec(__state&) const;
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template <> _LIBCPP_FUNC_VIS void __match_any_but_newline<wchar_t>::__exec(__state&) const;
+template <> _LIBCPP_EXPORTED_FROM_ABI void __match_any_but_newline<wchar_t>::__exec(__state&) const;
 #endif
 
 // __match_char

diff  --git a/libcxx/include/shared_mutex b/libcxx/include/shared_mutex
index f84a7d9daa563..59d7761fd1bd2 100644
--- a/libcxx/include/shared_mutex
+++ b/libcxx/include/shared_mutex
@@ -154,40 +154,38 @@ _LIBCPP_PUSH_MACROS
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-struct _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("shared_mutex"))
-__shared_mutex_base
-{
-    mutex               __mut_;
-    condition_variable  __gate1_;
-    condition_variable  __gate2_;
-    unsigned            __state_;
-
-    static const unsigned __write_entered_ = 1U << (sizeof(unsigned)*__CHAR_BIT__ - 1);
-    static const unsigned __n_readers_ = ~__write_entered_;
-
-    __shared_mutex_base();
-    _LIBCPP_INLINE_VISIBILITY ~__shared_mutex_base() = default;
-
-    __shared_mutex_base(const __shared_mutex_base&) = delete;
-    __shared_mutex_base& operator=(const __shared_mutex_base&) = delete;
-
-    // Exclusive ownership
-    void lock() _LIBCPP_THREAD_SAFETY_ANNOTATION(acquire_capability()); // blocking
-    bool try_lock() _LIBCPP_THREAD_SAFETY_ANNOTATION(try_acquire_capability(true));
-    void unlock() _LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability());
-
-    // Shared ownership
-    void lock_shared() _LIBCPP_THREAD_SAFETY_ANNOTATION(acquire_shared_capability()); // blocking
-    bool try_lock_shared() _LIBCPP_THREAD_SAFETY_ANNOTATION(try_acquire_shared_capability(true));
-    void unlock_shared() _LIBCPP_THREAD_SAFETY_ANNOTATION(release_shared_capability());
-
-//     typedef implementation-defined native_handle_type; // See 30.2.3
-//     native_handle_type native_handle(); // See 30.2.3
+struct _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_SHARED_MUTEX
+_LIBCPP_THREAD_SAFETY_ANNOTATION(capability("shared_mutex")) __shared_mutex_base {
+  mutex __mut_;
+  condition_variable __gate1_;
+  condition_variable __gate2_;
+  unsigned __state_;
+
+  static const unsigned __write_entered_ = 1U << (sizeof(unsigned) * __CHAR_BIT__ - 1);
+  static const unsigned __n_readers_     = ~__write_entered_;
+
+  __shared_mutex_base();
+  _LIBCPP_INLINE_VISIBILITY ~__shared_mutex_base() = default;
+
+  __shared_mutex_base(const __shared_mutex_base&)            = delete;
+  __shared_mutex_base& operator=(const __shared_mutex_base&) = delete;
+
+  // Exclusive ownership
+  void lock() _LIBCPP_THREAD_SAFETY_ANNOTATION(acquire_capability()); // blocking
+  bool try_lock() _LIBCPP_THREAD_SAFETY_ANNOTATION(try_acquire_capability(true));
+  void unlock() _LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability());
+
+  // Shared ownership
+  void lock_shared() _LIBCPP_THREAD_SAFETY_ANNOTATION(acquire_shared_capability()); // blocking
+  bool try_lock_shared() _LIBCPP_THREAD_SAFETY_ANNOTATION(try_acquire_shared_capability(true));
+  void unlock_shared() _LIBCPP_THREAD_SAFETY_ANNOTATION(release_shared_capability());
+
+  //     typedef implementation-defined native_handle_type; // See 30.2.3
+  //     native_handle_type native_handle(); // See 30.2.3
 };
 
-
-#if _LIBCPP_STD_VER >= 17
-class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_mutex
+#  if _LIBCPP_STD_VER >= 17
+class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_mutex
 {
     __shared_mutex_base __base_;
 public:
@@ -213,7 +211,7 @@ public:
 #endif
 
 
-class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_timed_mutex
+class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_timed_mutex
 {
     __shared_mutex_base __base_;
 public:

diff  --git a/libcxx/include/stdexcept b/libcxx/include/stdexcept
index 54be71938a731..5428535a10221 100644
--- a/libcxx/include/stdexcept
+++ b/libcxx/include/stdexcept
@@ -74,7 +74,7 @@ _LIBCPP_END_NAMESPACE_STD
 namespace std  // purposefully not using versioning namespace
 {
 
-class _LIBCPP_EXCEPTION_ABI logic_error
+class _LIBCPP_EXPORTED_FROM_ABI logic_error
     : public exception
 {
 #ifndef _LIBCPP_ABI_VCRUNTIME
@@ -97,7 +97,7 @@ public:
 #endif
 };
 
-class _LIBCPP_EXCEPTION_ABI runtime_error
+class _LIBCPP_EXPORTED_FROM_ABI runtime_error
     : public exception
 {
 #ifndef _LIBCPP_ABI_VCRUNTIME
@@ -120,7 +120,7 @@ public:
 #endif // _LIBCPP_ABI_VCRUNTIME
 };
 
-class _LIBCPP_EXCEPTION_ABI domain_error
+class _LIBCPP_EXPORTED_FROM_ABI domain_error
     : public logic_error
 {
 public:
@@ -133,7 +133,7 @@ public:
 #endif
 };
 
-class _LIBCPP_EXCEPTION_ABI invalid_argument
+class _LIBCPP_EXPORTED_FROM_ABI invalid_argument
     : public logic_error
 {
 public:
@@ -146,7 +146,7 @@ public:
 #endif
 };
 
-class _LIBCPP_EXCEPTION_ABI length_error
+class _LIBCPP_EXPORTED_FROM_ABI length_error
     : public logic_error
 {
 public:
@@ -158,7 +158,7 @@ public:
 #endif
 };
 
-class _LIBCPP_EXCEPTION_ABI out_of_range
+class _LIBCPP_EXPORTED_FROM_ABI out_of_range
     : public logic_error
 {
 public:
@@ -171,7 +171,7 @@ public:
 #endif
 };
 
-class _LIBCPP_EXCEPTION_ABI range_error
+class _LIBCPP_EXPORTED_FROM_ABI range_error
     : public runtime_error
 {
 public:
@@ -184,7 +184,7 @@ public:
 #endif
 };
 
-class _LIBCPP_EXCEPTION_ABI overflow_error
+class _LIBCPP_EXPORTED_FROM_ABI overflow_error
     : public runtime_error
 {
 public:
@@ -197,7 +197,7 @@ public:
 #endif
 };
 
-class _LIBCPP_EXCEPTION_ABI underflow_error
+class _LIBCPP_EXPORTED_FROM_ABI underflow_error
     : public runtime_error
 {
 public:
@@ -215,7 +215,7 @@ public:
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 // in the dylib
-_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_runtime_error(const char*);
+_LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void __throw_runtime_error(const char*);
 
 _LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
 void __throw_logic_error(const char*__msg)

diff  --git a/libcxx/include/string b/libcxx/include/string
index d116bacfa3263..70dbce2aaa2e5 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -642,7 +642,8 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20
 basic_string<_CharT, _Traits, _Allocator>
 operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, _CharT __y);
 
-extern template _LIBCPP_FUNC_VIS string operator+<char, char_traits<char>, allocator<char> >(char const*, string const&);
+extern template _LIBCPP_EXPORTED_FROM_ABI string operator+
+    <char, char_traits<char>, allocator<char> >(char const*, string const&);
 
 template <class _Iter>
 struct __string_is_trivial_iterator : public false_type {};
@@ -4178,46 +4179,46 @@ swap(basic_string<_CharT, _Traits, _Allocator>& __lhs,
     __lhs.swap(__rhs);
 }
 
-_LIBCPP_FUNC_VIS int                stoi  (const string& __str, size_t* __idx = nullptr, int __base = 10);
-_LIBCPP_FUNC_VIS long               stol  (const string& __str, size_t* __idx = nullptr, int __base = 10);
-_LIBCPP_FUNC_VIS unsigned long      stoul (const string& __str, size_t* __idx = nullptr, int __base = 10);
-_LIBCPP_FUNC_VIS long long          stoll (const string& __str, size_t* __idx = nullptr, int __base = 10);
-_LIBCPP_FUNC_VIS unsigned long long stoull(const string& __str, size_t* __idx = nullptr, int __base = 10);
+_LIBCPP_EXPORTED_FROM_ABI int                stoi  (const string& __str, size_t* __idx = nullptr, int __base = 10);
+_LIBCPP_EXPORTED_FROM_ABI long               stol  (const string& __str, size_t* __idx = nullptr, int __base = 10);
+_LIBCPP_EXPORTED_FROM_ABI unsigned long      stoul (const string& __str, size_t* __idx = nullptr, int __base = 10);
+_LIBCPP_EXPORTED_FROM_ABI long long          stoll (const string& __str, size_t* __idx = nullptr, int __base = 10);
+_LIBCPP_EXPORTED_FROM_ABI unsigned long long stoull(const string& __str, size_t* __idx = nullptr, int __base = 10);
 
-_LIBCPP_FUNC_VIS float       stof (const string& __str, size_t* __idx = nullptr);
-_LIBCPP_FUNC_VIS double      stod (const string& __str, size_t* __idx = nullptr);
-_LIBCPP_FUNC_VIS long double stold(const string& __str, size_t* __idx = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI float       stof (const string& __str, size_t* __idx = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI double      stod (const string& __str, size_t* __idx = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI long double stold(const string& __str, size_t* __idx = nullptr);
 
-_LIBCPP_FUNC_VIS string to_string(int __val);
-_LIBCPP_FUNC_VIS string to_string(unsigned __val);
-_LIBCPP_FUNC_VIS string to_string(long __val);
-_LIBCPP_FUNC_VIS string to_string(unsigned long __val);
-_LIBCPP_FUNC_VIS string to_string(long long __val);
-_LIBCPP_FUNC_VIS string to_string(unsigned long long __val);
-_LIBCPP_FUNC_VIS string to_string(float __val);
-_LIBCPP_FUNC_VIS string to_string(double __val);
-_LIBCPP_FUNC_VIS string to_string(long double __val);
+_LIBCPP_EXPORTED_FROM_ABI string to_string(int __val);
+_LIBCPP_EXPORTED_FROM_ABI string to_string(unsigned __val);
+_LIBCPP_EXPORTED_FROM_ABI string to_string(long __val);
+_LIBCPP_EXPORTED_FROM_ABI string to_string(unsigned long __val);
+_LIBCPP_EXPORTED_FROM_ABI string to_string(long long __val);
+_LIBCPP_EXPORTED_FROM_ABI string to_string(unsigned long long __val);
+_LIBCPP_EXPORTED_FROM_ABI string to_string(float __val);
+_LIBCPP_EXPORTED_FROM_ABI string to_string(double __val);
+_LIBCPP_EXPORTED_FROM_ABI string to_string(long double __val);
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_LIBCPP_FUNC_VIS int                stoi  (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
-_LIBCPP_FUNC_VIS long               stol  (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
-_LIBCPP_FUNC_VIS unsigned long      stoul (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
-_LIBCPP_FUNC_VIS long long          stoll (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
-_LIBCPP_FUNC_VIS unsigned long long stoull(const wstring& __str, size_t* __idx = nullptr, int __base = 10);
-
-_LIBCPP_FUNC_VIS float       stof (const wstring& __str, size_t* __idx = nullptr);
-_LIBCPP_FUNC_VIS double      stod (const wstring& __str, size_t* __idx = nullptr);
-_LIBCPP_FUNC_VIS long double stold(const wstring& __str, size_t* __idx = nullptr);
-
-_LIBCPP_FUNC_VIS wstring to_wstring(int __val);
-_LIBCPP_FUNC_VIS wstring to_wstring(unsigned __val);
-_LIBCPP_FUNC_VIS wstring to_wstring(long __val);
-_LIBCPP_FUNC_VIS wstring to_wstring(unsigned long __val);
-_LIBCPP_FUNC_VIS wstring to_wstring(long long __val);
-_LIBCPP_FUNC_VIS wstring to_wstring(unsigned long long __val);
-_LIBCPP_FUNC_VIS wstring to_wstring(float __val);
-_LIBCPP_FUNC_VIS wstring to_wstring(double __val);
-_LIBCPP_FUNC_VIS wstring to_wstring(long double __val);
+_LIBCPP_EXPORTED_FROM_ABI int                stoi  (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
+_LIBCPP_EXPORTED_FROM_ABI long               stol  (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
+_LIBCPP_EXPORTED_FROM_ABI unsigned long      stoul (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
+_LIBCPP_EXPORTED_FROM_ABI long long          stoll (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
+_LIBCPP_EXPORTED_FROM_ABI unsigned long long stoull(const wstring& __str, size_t* __idx = nullptr, int __base = 10);
+
+_LIBCPP_EXPORTED_FROM_ABI float       stof (const wstring& __str, size_t* __idx = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI double      stod (const wstring& __str, size_t* __idx = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI long double stold(const wstring& __str, size_t* __idx = nullptr);
+
+_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(int __val);
+_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(unsigned __val);
+_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(long __val);
+_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(unsigned long __val);
+_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(long long __val);
+_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(unsigned long long __val);
+_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(float __val);
+_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(double __val);
+_LIBCPP_EXPORTED_FROM_ABI wstring to_wstring(long double __val);
 #endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
 
 template<class _CharT, class _Traits, class _Allocator>

diff  --git a/libcxx/include/strstream b/libcxx/include/strstream
index 594353bac426c..35d655b8261a4 100644
--- a/libcxx/include/strstream
+++ b/libcxx/include/strstream
@@ -141,7 +141,7 @@ private:
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_DEPRECATED _LIBCPP_TYPE_VIS strstreambuf
+class _LIBCPP_DEPRECATED _LIBCPP_EXPORTED_FROM_ABI strstreambuf
     : public streambuf
 {
 public:
@@ -237,7 +237,7 @@ strstreambuf::operator=(strstreambuf&& __rhs)
 
 #endif // _LIBCPP_CXX03_LANG
 
-class _LIBCPP_DEPRECATED _LIBCPP_TYPE_VIS istrstream
+class _LIBCPP_DEPRECATED _LIBCPP_EXPORTED_FROM_ABI istrstream
     : public istream
 {
 public:
@@ -290,7 +290,7 @@ private:
     strstreambuf __sb_;
 };
 
-class _LIBCPP_DEPRECATED _LIBCPP_TYPE_VIS ostrstream
+class _LIBCPP_DEPRECATED _LIBCPP_EXPORTED_FROM_ABI ostrstream
     : public ostream
 {
 public:
@@ -343,7 +343,7 @@ private:
     strstreambuf __sb_; // exposition only
 };
 
-class _LIBCPP_DEPRECATED _LIBCPP_TYPE_VIS strstream
+class _LIBCPP_DEPRECATED _LIBCPP_EXPORTED_FROM_ABI strstream
     : public iostream
 {
 public:

diff  --git a/libcxx/include/thread b/libcxx/include/thread
index 33227ff9a216e..8a905b7fea7ec 100644
--- a/libcxx/include/thread
+++ b/libcxx/include/thread
@@ -135,13 +135,13 @@ _LIBCPP_PUSH_MACROS
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 template <class _Tp> class __thread_specific_ptr;
-class _LIBCPP_TYPE_VIS __thread_struct;
+class _LIBCPP_EXPORTED_FROM_ABI __thread_struct;
 class _LIBCPP_HIDDEN __thread_struct_imp;
 class __assoc_sub_state;
 
-_LIBCPP_FUNC_VIS __thread_specific_ptr<__thread_struct>& __thread_local_data();
+_LIBCPP_EXPORTED_FROM_ABI __thread_specific_ptr<__thread_struct>& __thread_local_data();
 
-class _LIBCPP_TYPE_VIS __thread_struct
+class _LIBCPP_EXPORTED_FROM_ABI __thread_struct
 {
     __thread_struct_imp* __p_;
 
@@ -164,7 +164,7 @@ class __thread_specific_ptr
      // and only with _Tp == __thread_struct.
     static_assert((is_same<_Tp, __thread_struct>::value), "");
     __thread_specific_ptr();
-    friend _LIBCPP_FUNC_VIS __thread_specific_ptr<__thread_struct>& __thread_local_data();
+    friend _LIBCPP_EXPORTED_FROM_ABI __thread_specific_ptr<__thread_struct>& __thread_local_data();
 
     __thread_specific_ptr(const __thread_specific_ptr&);
     __thread_specific_ptr& operator=(const __thread_specific_ptr&);
@@ -276,7 +276,7 @@ struct _LIBCPP_TEMPLATE_VIS formatter<__thread_id, _CharT> {
 };
 #endif // _LIBCPP_STD_VER >= 23
 
-class _LIBCPP_TYPE_VIS thread
+class _LIBCPP_EXPORTED_FROM_ABI thread
 {
     __libcpp_thread_t __t_;
 
@@ -413,7 +413,7 @@ void swap(thread& __x, thread& __y) _NOEXCEPT {__x.swap(__y);}
 namespace this_thread
 {
 
-_LIBCPP_FUNC_VIS void sleep_for(const chrono::nanoseconds& __ns);
+_LIBCPP_EXPORTED_FROM_ABI void sleep_for(const chrono::nanoseconds& __ns);
 
 template <class _Rep, class _Period>
 _LIBCPP_HIDE_FROM_ABI void

diff  --git a/libcxx/include/typeinfo b/libcxx/include/typeinfo
index e7784b46a577b..0dc9f09b9e25f 100644
--- a/libcxx/include/typeinfo
+++ b/libcxx/include/typeinfo
@@ -79,7 +79,7 @@ namespace std  // purposefully not using versioning namespace
 
 #if defined(_LIBCPP_ABI_MICROSOFT)
 
-class _LIBCPP_EXCEPTION_ABI type_info
+class _LIBCPP_EXPORTED_FROM_ABI type_info
 {
     type_info& operator=(const type_info&);
     type_info(const type_info&);
@@ -299,7 +299,7 @@ struct __type_info_implementations {
      __impl;
 };
 
-class _LIBCPP_EXCEPTION_ABI type_info
+class _LIBCPP_EXPORTED_FROM_ABI type_info
 {
   type_info& operator=(const type_info&);
   type_info(const type_info&);
@@ -354,7 +354,7 @@ public:
 };
 #endif // defined(_LIBCPP_ABI_MICROSOFT)
 
-class _LIBCPP_EXCEPTION_ABI bad_cast
+class _LIBCPP_EXPORTED_FROM_ABI bad_cast
     : public exception
 {
  public:
@@ -364,7 +364,7 @@ class _LIBCPP_EXCEPTION_ABI bad_cast
   const char* what() const _NOEXCEPT override;
 };
 
-class _LIBCPP_EXCEPTION_ABI bad_typeid
+class _LIBCPP_EXPORTED_FROM_ABI bad_typeid
     : public exception
 {
  public:

diff  --git a/libcxx/include/valarray b/libcxx/include/valarray
index df55e9508043a..09a7c9016c994 100644
--- a/libcxx/include/valarray
+++ b/libcxx/include/valarray
@@ -415,7 +415,7 @@ public:
 };
 
 template <class _Tp> class _LIBCPP_TEMPLATE_VIS slice_array;
-class _LIBCPP_TYPE_VIS gslice;
+class _LIBCPP_EXPORTED_FROM_ABI gslice;
 template <class _Tp> class _LIBCPP_TEMPLATE_VIS gslice_array;
 template <class _Tp> class _LIBCPP_TEMPLATE_VIS mask_array;
 template <class _Tp> class _LIBCPP_TEMPLATE_VIS indirect_array;
@@ -1121,7 +1121,7 @@ template<class _Tp, size_t _Size>
 valarray(const _Tp(&)[_Size], size_t) -> valarray<_Tp>;
 #endif
 
-extern template _LIBCPP_FUNC_VIS void valarray<size_t>::resize(size_t, size_t);
+extern template _LIBCPP_EXPORTED_FROM_ABI void valarray<size_t>::resize(size_t, size_t);
 
 template <class _Op, class _Tp>
 struct _UnaryOp<_Op, valarray<_Tp> >
@@ -1538,7 +1538,7 @@ slice_array<_Tp>::operator=(const value_type& __x) const
 
 // gslice
 
-class _LIBCPP_TYPE_VIS gslice
+class _LIBCPP_EXPORTED_FROM_ABI gslice
 {
     valarray<size_t> __size_;
     valarray<size_t> __stride_;

diff  --git a/libcxx/include/variant b/libcxx/include/variant
index 2ee7f4891f1ab..8ef00791ede48 100644
--- a/libcxx/include/variant
+++ b/libcxx/include/variant
@@ -260,7 +260,7 @@ _LIBCPP_PUSH_MACROS
 
 namespace std { // explicitly not using versioning namespace
 
-class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS bad_variant_access : public exception {
+class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS bad_variant_access : public exception {
 public:
    const char* what() const _NOEXCEPT override;
 };

diff  --git a/libcxx/src/any.cpp b/libcxx/src/any.cpp
index 9a101b44a71a8..36f95c0ec4fc5 100644
--- a/libcxx/src/any.cpp
+++ b/libcxx/src/any.cpp
@@ -21,7 +21,7 @@ const char* bad_any_cast::what() const noexcept {
 //  Even though it no longer exists in a header file
 _LIBCPP_BEGIN_NAMESPACE_LFTS
 
-class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast
+class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast
 {
 public:
     virtual const char* what() const noexcept;

diff  --git a/libcxx/src/charconv.cpp b/libcxx/src/charconv.cpp
index d01ecddc46601..aa52220413aa2 100644
--- a/libcxx/src/charconv.cpp
+++ b/libcxx/src/charconv.cpp
@@ -18,13 +18,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 namespace __itoa
 {
 
-_LIBCPP_FUNC_VIS char*
+_LIBCPP_EXPORTED_FROM_ABI char*
 __u32toa(uint32_t value, char* buffer) noexcept
 {
   return __base_10_u32(buffer, value);
 }
 
-_LIBCPP_FUNC_VIS char*
+_LIBCPP_EXPORTED_FROM_ABI char*
 __u64toa(uint64_t value, char* buffer) noexcept
 {
   return __base_10_u64(buffer, value);

diff  --git a/libcxx/src/condition_variable_destructor.cpp b/libcxx/src/condition_variable_destructor.cpp
index c217a09394fcb..333face19d50c 100644
--- a/libcxx/src/condition_variable_destructor.cpp
+++ b/libcxx/src/condition_variable_destructor.cpp
@@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #ifdef NEEDS_CONDVAR_DESTRUCTOR
 
-class _LIBCPP_TYPE_VIS condition_variable
+class _LIBCPP_EXPORTED_FROM_ABI condition_variable
 {
     __libcpp_condvar_t __cv_ = _LIBCPP_CONDVAR_INITIALIZER;
 public:

diff  --git a/libcxx/src/debug.cpp b/libcxx/src/debug.cpp
index 8f1d328f0e0f4..118ae9464dfca 100644
--- a/libcxx/src/debug.cpp
+++ b/libcxx/src/debug.cpp
@@ -24,7 +24,7 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-_LIBCPP_FUNC_VIS
+_LIBCPP_EXPORTED_FROM_ABI
 __libcpp_db*
 __get_db()
 {
@@ -32,7 +32,7 @@ __get_db()
     return &db;
 }
 
-_LIBCPP_FUNC_VIS
+_LIBCPP_EXPORTED_FROM_ABI
 const __libcpp_db*
 __get_const_db()
 {

diff  --git a/libcxx/src/experimental/memory_resource.cpp b/libcxx/src/experimental/memory_resource.cpp
index d6bb52ec174d2..8ac2375d69606 100644
--- a/libcxx/src/experimental/memory_resource.cpp
+++ b/libcxx/src/experimental/memory_resource.cpp
@@ -27,7 +27,7 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
 
 // new_delete_resource()
 
-class _LIBCPP_TYPE_VIS __new_delete_memory_resource_imp
+class _LIBCPP_EXPORTED_FROM_ABI __new_delete_memory_resource_imp
     : public memory_resource
 {
     void *do_allocate(size_t size, size_t align) override {
@@ -51,7 +51,7 @@ class _LIBCPP_TYPE_VIS __new_delete_memory_resource_imp
 
 // null_memory_resource()
 
-class _LIBCPP_TYPE_VIS __null_memory_resource_imp
+class _LIBCPP_EXPORTED_FROM_ABI __null_memory_resource_imp
     : public memory_resource
 {
 public:

diff  --git a/libcxx/src/filesystem/int128_builtins.cpp b/libcxx/src/filesystem/int128_builtins.cpp
index f003da27a74d0..96bcc5fa67e85 100644
--- a/libcxx/src/filesystem/int128_builtins.cpp
+++ b/libcxx/src/filesystem/int128_builtins.cpp
@@ -18,7 +18,7 @@
 
 #if !defined(_LIBCPP_HAS_NO_INT128)
 
-extern "C" __attribute__((no_sanitize("undefined"))) _LIBCPP_FUNC_VIS
+extern "C" __attribute__((no_sanitize("undefined"))) _LIBCPP_EXPORTED_FROM_ABI
 __int128_t __muloti4(__int128_t a, __int128_t b, int* overflow) {
   const int N = (int)(sizeof(__int128_t) * CHAR_BIT);
   const __int128_t MIN = (__int128_t)1 << (N - 1);

diff  --git a/libcxx/src/iostream.cpp b/libcxx/src/iostream.cpp
index 9b1a1a41e84bb..13e6aeeb2b27a 100644
--- a/libcxx/src/iostream.cpp
+++ b/libcxx/src/iostream.cpp
@@ -21,7 +21,7 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-_ALIGNAS_TYPE (istream) _LIBCPP_FUNC_VIS char cin[sizeof(istream)]
+_ALIGNAS_TYPE (istream) _LIBCPP_EXPORTED_FROM_ABI char cin[sizeof(istream)]
 #if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
 __asm__("?cin@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_istream at DU?$char_traits at D@" _LIBCPP_ABI_NAMESPACE_STR "@std@@@12 at A")
 #endif
@@ -30,7 +30,7 @@ _ALIGNAS_TYPE (__stdinbuf<char> ) static char __cin[sizeof(__stdinbuf <char>)];
 static mbstate_t mb_cin;
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_ALIGNAS_TYPE (wistream) _LIBCPP_FUNC_VIS char wcin[sizeof(wistream)]
+_ALIGNAS_TYPE (wistream) _LIBCPP_EXPORTED_FROM_ABI char wcin[sizeof(wistream)]
 #if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
 __asm__("?wcin@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_istream at _WU?$char_traits at _W@" _LIBCPP_ABI_NAMESPACE_STR "@std@@@12 at A")
 #endif
@@ -39,7 +39,7 @@ _ALIGNAS_TYPE (__stdinbuf<wchar_t> ) static char __wcin[sizeof(__stdinbuf <wchar
 static mbstate_t mb_wcin;
 #endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
 
-_ALIGNAS_TYPE (ostream) _LIBCPP_FUNC_VIS char cout[sizeof(ostream)]
+_ALIGNAS_TYPE (ostream) _LIBCPP_EXPORTED_FROM_ABI char cout[sizeof(ostream)]
 #if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
 __asm__("?cout@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at DU?$char_traits at D@" _LIBCPP_ABI_NAMESPACE_STR "@std@@@12 at A")
 #endif
@@ -48,7 +48,7 @@ _ALIGNAS_TYPE (__stdoutbuf<char>) static char __cout[sizeof(__stdoutbuf<char>)];
 static mbstate_t mb_cout;
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_ALIGNAS_TYPE (wostream) _LIBCPP_FUNC_VIS char wcout[sizeof(wostream)]
+_ALIGNAS_TYPE (wostream) _LIBCPP_EXPORTED_FROM_ABI char wcout[sizeof(wostream)]
 #if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
 __asm__("?wcout@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at _WU?$char_traits at _W@" _LIBCPP_ABI_NAMESPACE_STR "@std@@@12 at A")
 #endif
@@ -57,7 +57,7 @@ _ALIGNAS_TYPE (__stdoutbuf<wchar_t>) static char __wcout[sizeof(__stdoutbuf<wcha
 static mbstate_t mb_wcout;
 #endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
 
-_ALIGNAS_TYPE (ostream) _LIBCPP_FUNC_VIS char cerr[sizeof(ostream)]
+_ALIGNAS_TYPE (ostream) _LIBCPP_EXPORTED_FROM_ABI char cerr[sizeof(ostream)]
 #if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
 __asm__("?cerr@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at DU?$char_traits at D@" _LIBCPP_ABI_NAMESPACE_STR "@std@@@12 at A")
 #endif
@@ -66,7 +66,7 @@ _ALIGNAS_TYPE (__stdoutbuf<char>) static char __cerr[sizeof(__stdoutbuf<char>)];
 static mbstate_t mb_cerr;
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_ALIGNAS_TYPE (wostream) _LIBCPP_FUNC_VIS char wcerr[sizeof(wostream)]
+_ALIGNAS_TYPE (wostream) _LIBCPP_EXPORTED_FROM_ABI char wcerr[sizeof(wostream)]
 #if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
 __asm__("?wcerr@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at _WU?$char_traits at _W@" _LIBCPP_ABI_NAMESPACE_STR "@std@@@12 at A")
 #endif
@@ -75,14 +75,14 @@ _ALIGNAS_TYPE (__stdoutbuf<wchar_t>) static char __wcerr[sizeof(__stdoutbuf<wcha
 static mbstate_t mb_wcerr;
 #endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
 
-_ALIGNAS_TYPE (ostream) _LIBCPP_FUNC_VIS char clog[sizeof(ostream)]
+_ALIGNAS_TYPE (ostream) _LIBCPP_EXPORTED_FROM_ABI char clog[sizeof(ostream)]
 #if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
 __asm__("?clog@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at DU?$char_traits at D@" _LIBCPP_ABI_NAMESPACE_STR "@std@@@12 at A")
 #endif
 ;
 
 #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_ALIGNAS_TYPE (wostream) _LIBCPP_FUNC_VIS char wclog[sizeof(wostream)]
+_ALIGNAS_TYPE (wostream) _LIBCPP_EXPORTED_FROM_ABI char wclog[sizeof(wostream)]
 #if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
 __asm__("?wclog@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at _WU?$char_traits at _W@" _LIBCPP_ABI_NAMESPACE_STR "@std@@@12 at A")
 #endif

diff  --git a/libcxx/src/legacy_pointer_safety.cpp b/libcxx/src/legacy_pointer_safety.cpp
index 5d2b04c121ae6..a9361ca879bb5 100644
--- a/libcxx/src/legacy_pointer_safety.cpp
+++ b/libcxx/src/legacy_pointer_safety.cpp
@@ -15,9 +15,9 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-_LIBCPP_FUNC_VIS void declare_reachable(void*) {}
-_LIBCPP_FUNC_VIS void declare_no_pointers(char*, size_t) {}
-_LIBCPP_FUNC_VIS void undeclare_no_pointers(char*, size_t) {}
-_LIBCPP_FUNC_VIS void* __undeclare_reachable(void* p) { return p; }
+_LIBCPP_EXPORTED_FROM_ABI void declare_reachable(void*) {}
+_LIBCPP_EXPORTED_FROM_ABI void declare_no_pointers(char*, size_t) {}
+_LIBCPP_EXPORTED_FROM_ABI void undeclare_no_pointers(char*, size_t) {}
+_LIBCPP_EXPORTED_FROM_ABI void* __undeclare_reachable(void* p) { return p; }
 
 _LIBCPP_END_NAMESPACE_STD

diff  --git a/libcxx/src/memory_resource.cpp b/libcxx/src/memory_resource.cpp
index ca1d6406aa270..7f7127746130e 100644
--- a/libcxx/src/memory_resource.cpp
+++ b/libcxx/src/memory_resource.cpp
@@ -37,7 +37,7 @@ static bool is_aligned_to(void* ptr, size_t align) {
 }
 #endif
 
-class _LIBCPP_TYPE_VIS __new_delete_memory_resource_imp : public memory_resource {
+class _LIBCPP_EXPORTED_FROM_ABI __new_delete_memory_resource_imp : public memory_resource {
   void* do_allocate(size_t bytes, size_t align) override {
 #ifndef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
     return std::__libcpp_allocate(bytes, align);
@@ -60,7 +60,7 @@ class _LIBCPP_TYPE_VIS __new_delete_memory_resource_imp : public memory_resource
 
 // null_memory_resource()
 
-class _LIBCPP_TYPE_VIS __null_memory_resource_imp : public memory_resource {
+class _LIBCPP_EXPORTED_FROM_ABI __null_memory_resource_imp : public memory_resource {
   void* do_allocate(size_t, size_t) override { __throw_bad_alloc(); }
   void do_deallocate(void*, size_t, size_t) override {}
   bool do_is_equal(const memory_resource& other) const noexcept override { return &other == this; }

diff  --git a/libcxx/src/mutex_destructor.cpp b/libcxx/src/mutex_destructor.cpp
index 6850b6e6f4950..d366a4e1b3170 100644
--- a/libcxx/src/mutex_destructor.cpp
+++ b/libcxx/src/mutex_destructor.cpp
@@ -28,7 +28,7 @@
 _LIBCPP_BEGIN_NAMESPACE_STD
 
 #ifdef NEEDS_MUTEX_DESTRUCTOR
-class _LIBCPP_TYPE_VIS mutex
+class _LIBCPP_EXPORTED_FROM_ABI mutex
 {
     __libcpp_mutex_t __m_ = _LIBCPP_MUTEX_INITIALIZER;
 

diff  --git a/libcxx/src/optional.cpp b/libcxx/src/optional.cpp
index e2b5ccef99aef..d0214981a2fda 100644
--- a/libcxx/src/optional.cpp
+++ b/libcxx/src/optional.cpp
@@ -27,7 +27,7 @@ const char* bad_optional_access::what() const noexcept {
 //  Even though it no longer exists in a header file
 _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL
 
-class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
+class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
   : public std::logic_error
 {
 public:

diff  --git a/libcxx/src/support/ibm/mbsnrtowcs.cpp b/libcxx/src/support/ibm/mbsnrtowcs.cpp
index d7220fb46d8a7..6edc3c254dea2 100644
--- a/libcxx/src/support/ibm/mbsnrtowcs.cpp
+++ b/libcxx/src/support/ibm/mbsnrtowcs.cpp
@@ -18,7 +18,7 @@
 // Returns (size_t) -1 when an invalid sequence is encountered.
 // Leaves *`src` pointing to the next character to convert or NULL
 // if a null character was converted from *`src`.
-_LIBCPP_FUNC_VIS
+_LIBCPP_EXPORTED_FROM_ABI
 size_t mbsnrtowcs(wchar_t *__restrict dst, const char **__restrict src,
                    size_t src_size_bytes, size_t max_dest_chars,
                    mbstate_t *__restrict ps) {

diff  --git a/libcxx/src/support/ibm/wcsnrtombs.cpp b/libcxx/src/support/ibm/wcsnrtombs.cpp
index 66395bfdcb2da..d6333fe5f1fa8 100644
--- a/libcxx/src/support/ibm/wcsnrtombs.cpp
+++ b/libcxx/src/support/ibm/wcsnrtombs.cpp
@@ -17,7 +17,7 @@
 // converted from *src, excluding the null terminator.
 // Returns (size_t) -1 if an error occurs and sets errno.
 // If `dst` is NULL, `dst_size_bytes` is ignored and no bytes are copied to `dst`.
-_LIBCPP_FUNC_VIS
+_LIBCPP_EXPORTED_FROM_ABI
 size_t wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src,
                    size_t max_source_chars, size_t dst_size_bytes,
                    mbstate_t *__restrict ps) {

diff  --git a/libcxx/src/valarray.cpp b/libcxx/src/valarray.cpp
index 5d63bc11846d5..f377e0f4e871d 100644
--- a/libcxx/src/valarray.cpp
+++ b/libcxx/src/valarray.cpp
@@ -12,8 +12,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 // These two symbols are part of the v1 ABI but not part of the >=v2 ABI.
 #if _LIBCPP_ABI_VERSION == 1
-template _LIBCPP_FUNC_VIS valarray<size_t>::valarray(size_t);
-template _LIBCPP_FUNC_VIS valarray<size_t>::~valarray();
+template _LIBCPP_EXPORTED_FROM_ABI valarray<size_t>::valarray(size_t);
+template _LIBCPP_EXPORTED_FROM_ABI valarray<size_t>::~valarray();
 #endif
 
 template void valarray<size_t>::resize(size_t, size_t);


        


More information about the libcxx-commits mailing list