And the handlers should be extern C.

llvm-svn: 151261
This commit is contained in:
Howard Hinnant 2012-02-23 17:25:34 +00:00
parent aae960d978
commit 2d809ac734
1 changed files with 5 additions and 0 deletions

View File

@ -85,10 +85,15 @@ static void default_unexpected_handler()
terminate();
}
extern "C"
{
terminate_handler __cxa_terminate_handler = default_terminate_handler;
unexpected_handler __cxa_unexpected_handler = default_unexpected_handler;
new_handler __cxa_new_handler = 0;
} // extern "C"
unexpected_handler
set_unexpected(unexpected_handler func) _NOEXCEPT
{