summaryrefslogtreecommitdiff
path: root/src/support/runtime/exception_msvc.ipp
diff options
context:
space:
mode:
Diffstat (limited to 'src/support/runtime/exception_msvc.ipp')
-rw-r--r--src/support/runtime/exception_msvc.ipp28
1 files changed, 8 insertions, 20 deletions
diff --git a/src/support/runtime/exception_msvc.ipp b/src/support/runtime/exception_msvc.ipp
index d5bf5b726ea5c..87d5a66fc8f98 100644
--- a/src/support/runtime/exception_msvc.ipp
+++ b/src/support/runtime/exception_msvc.ipp
@@ -15,30 +15,18 @@
#include <stdio.h>
#include <stdlib.h>
-#if !defined(_ACRTIMP)
-#define _ACRTIMP __declspec(dllimport)
-#endif
-
-#if !defined(_VCRTIMP)
-#define _VCRTIMP __declspec(dllimport)
-#endif
-
-#if !defined(__CRTDECL)
-#define __CRTDECL __cdecl
-#endif
-
extern "C" {
-typedef void (__CRTDECL* terminate_handler)();
-_ACRTIMP terminate_handler __cdecl set_terminate(
+typedef void (__cdecl* terminate_handler)();
+_LIBCPP_CRT_FUNC terminate_handler __cdecl set_terminate(
terminate_handler _NewTerminateHandler) throw();
-_ACRTIMP terminate_handler __cdecl _get_terminate();
+_LIBCPP_CRT_FUNC terminate_handler __cdecl _get_terminate();
-typedef void (__CRTDECL* unexpected_handler)();
-_VCRTIMP unexpected_handler __cdecl set_unexpected(
+typedef void (__cdecl* unexpected_handler)();
+unexpected_handler __cdecl set_unexpected(
unexpected_handler _NewUnexpectedHandler) throw();
-_VCRTIMP unexpected_handler __cdecl _get_unexpected();
+unexpected_handler __cdecl _get_unexpected();
-_VCRTIMP int __cdecl __uncaught_exceptions();
+int __cdecl __uncaught_exceptions();
}
namespace std {
@@ -109,6 +97,7 @@ bad_array_length::what() const _NOEXCEPT
return "bad_array_length";
}
+#if defined(_LIBCPP_NO_VCRUNTIME)
bad_cast::bad_cast() _NOEXCEPT
{
}
@@ -137,7 +126,6 @@ bad_typeid::what() const _NOEXCEPT
return "std::bad_typeid";
}
-#if defined(_LIBCPP_NO_VCRUNTIME)
exception::~exception() _NOEXCEPT
{
}