summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/cxa_default_handlers.cpp
diff options
context:
space:
mode:
authorHoward Hinnant <hhinnant@apple.com>2012-03-19 16:20:34 +0000
committerHoward Hinnant <hhinnant@apple.com>2012-03-19 16:20:34 +0000
commit4ac72dd982539d681eb0ab988ccbb6f4594c6ecc (patch)
tree10ed2e3a06cd3e6108d1e760932a48cc410b26cf /libcxxabi/src/cxa_default_handlers.cpp
parentbed1cb1e13ce73d485e7939f9e2b022a01779960 (diff)
downloadbcm5719-llvm-4ac72dd982539d681eb0ab988ccbb6f4594c6ecc.tar.gz
bcm5719-llvm-4ac72dd982539d681eb0ab988ccbb6f4594c6ecc.zip
I've moved __cxa_terminate_handler, __cxa_unexpected_handler and __cxa_new_handler from the public header cxxabi.h into the private header cxa_handlers.hpp. During this move I've also moved them from namespace __cxxabiapple into the global namespace. They are, and have always been extern C and so the namespace (or lack of it) does not affect their ABI. In general external clients should not reference these symbols. They are atomic variables and will be changing into C++11 atomic variables in the future. However for those few clients who really need access to them, their name, mangling, size, alignment and layout will remain stable. You just may need your own declaration of them. Include guards have been added to the private header cxa_exception.hpp. The private header cxa_default_handlers.hpp has been removed and the default handlers are now file-static. Include guards have been added to the private header cxa_handlers.hpp.
llvm-svn: 153039
Diffstat (limited to 'libcxxabi/src/cxa_default_handlers.cpp')
-rw-r--r--libcxxabi/src/cxa_default_handlers.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/libcxxabi/src/cxa_default_handlers.cpp b/libcxxabi/src/cxa_default_handlers.cpp
index 403ed04429a..726f7eb0e0a 100644
--- a/libcxxabi/src/cxa_default_handlers.cpp
+++ b/libcxxabi/src/cxa_default_handlers.cpp
@@ -17,7 +17,6 @@
#include "cxa_handlers.hpp"
#include "cxa_exception.hpp"
#include "private_typeinfo.h"
-#include "cxa_default_handlers.hpp"
__attribute__((noreturn))
static void default_handler(const char* cause)
@@ -76,14 +75,14 @@ static void default_handler(const char* cause)
}
-__attribute__((visibility("hidden"), noreturn))
-void default_terminate_handler()
+__attribute__((noreturn))
+static void default_terminate_handler()
{
default_handler("terminate");
}
-__attribute__((visibility("hidden"), noreturn))
-void default_unexpected_handler()
+__attribute__((noreturn))
+static void default_unexpected_handler()
{
default_handler("unexpected");
}
@@ -103,7 +102,7 @@ set_unexpected(unexpected_handler func) _NOEXCEPT
{
if (func == 0)
func = default_unexpected_handler;
- return __sync_swap(&__cxxabiapple::__cxa_unexpected_handler, func);
+ return __sync_swap(&__cxa_unexpected_handler, func);
}
terminate_handler
@@ -111,7 +110,7 @@ set_terminate(terminate_handler func) _NOEXCEPT
{
if (func == 0)
func = default_terminate_handler;
- return __sync_swap(&__cxxabiapple::__cxa_terminate_handler, func);
+ return __sync_swap(&__cxa_terminate_handler, func);
}
};
OpenPOWER on IntegriCloud