summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src
diff options
context:
space:
mode:
authorMarshall Clow <mclow@qualcomm.com>2011-06-03 02:04:41 +0000
committerMarshall Clow <mclow@qualcomm.com>2011-06-03 02:04:41 +0000
commitad3dea06a9f83d20fa4f153117a9ba718619ccf9 (patch)
tree6b45c16b7c83499d7be456692bad0ac937f987be /libcxxabi/src
parent60954bbbbcc1c4aea1b80d918ffc7190f2b4e112 (diff)
downloadbcm5719-llvm-ad3dea06a9f83d20fa4f153117a9ba718619ccf9.tar.gz
bcm5719-llvm-ad3dea06a9f83d20fa4f153117a9ba718619ccf9.zip
Added __cxa_bad_cast and __cxa_bad_typeid and placeholder NORETURN macro
llvm-svn: 132524
Diffstat (limited to 'libcxxabi/src')
-rw-r--r--libcxxabi/src/cxa_aux_runtime.cpp34
-rw-r--r--libcxxabi/src/cxa_virtual.cpp2
2 files changed, 36 insertions, 0 deletions
diff --git a/libcxxabi/src/cxa_aux_runtime.cpp b/libcxxabi/src/cxa_aux_runtime.cpp
new file mode 100644
index 00000000000..cf6851b4f02
--- /dev/null
+++ b/libcxxabi/src/cxa_aux_runtime.cpp
@@ -0,0 +1,34 @@
+//===------------------------ cxa_aux_runtime.cpp -------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//
+// This file implements the "Auxiliary Runtime APIs"
+// http://www.codesourcery.com/public/cxx-abi/abi-eh.html#cxx-aux
+//===----------------------------------------------------------------------===//
+
+#include "cxxabi.h"
+#include <typeinfo>
+
+namespace __cxxabiv1
+{
+
+extern "C"
+{
+
+LIBCXXABI_NORETURN
+void __cxa_bad_cast (void) {
+ throw std::bad_cast();
+}
+
+LIBCXXABI_NORETURN
+void __cxa_bad_typeid(void) {
+ throw std::bad_typeid();
+}
+
+} // extern "C"
+
+} // abi
diff --git a/libcxxabi/src/cxa_virtual.cpp b/libcxxabi/src/cxa_virtual.cpp
index bdcf6878734..e3450d12b1e 100644
--- a/libcxxabi/src/cxa_virtual.cpp
+++ b/libcxxabi/src/cxa_virtual.cpp
@@ -18,11 +18,13 @@ namespace __cxxabiv1
extern "C"
{
+LIBCXXABI_NORETURN
void __cxa_pure_virtual(void) {
fputs("Pure virtual function called!\n", stderr);
abort();
}
+LIBCXXABI_NORETURN
void __cxa_deleted_virtual(void) {
fputs("Deleted virtual function called!\n", stderr);
abort();
OpenPOWER on IntegriCloud