libcxx: Stop using private MSVC macros in the exception implementation. Inline the provided "fallback" definitions (which seem to always be taken) that expand to __cdecl into users. The fallback definitions for the *CRTIMP* macros were wrong in the case where the CRT is being linked statically, so define our own macro as a replacement. Differential Revision: https://reviews.llvm.org/D42158 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@322617 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/__config b/include/__config index 94832ff..aa06452 100644 --- a/include/__config +++ b/include/__config
@@ -626,6 +626,12 @@ #endif // _LIBCPP_COMPILER_[CLANG|GCC|MSVC|IBM] #if defined(_LIBCPP_OBJECT_FORMAT_COFF) +#ifdef _DLL +# define _LIBCPP_CRT_FUNC __declspec(dllimport) +#else +# define _LIBCPP_CRT_FUNC +#endif + #if defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) # define _LIBCPP_DLL_VIS # define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS