[cfe-commits] [libcxxabi] r148967 - in /libcxxabi/trunk/src: cxa_unexpected.cpp private_typeinfo.cpp private_typeinfo.h temporary.cpp

Howard Hinnant hhinnant at apple.com
Wed Jan 25 11:27:42 PST 2012


Author: hhinnant
Date: Wed Jan 25 13:27:42 2012
New Revision: 148967

URL: http://llvm.org/viewvc/llvm-project?rev=148967&view=rev
Log:
These commits are intended to be temporary in nature and are to facilitate the testing of libc++abi.dylib at this point in time.

Added:
    libcxxabi/trunk/src/cxa_unexpected.cpp
    libcxxabi/trunk/src/temporary.cpp
Modified:
    libcxxabi/trunk/src/private_typeinfo.cpp
    libcxxabi/trunk/src/private_typeinfo.h

Added: libcxxabi/trunk/src/cxa_unexpected.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_unexpected.cpp?rev=148967&view=auto
==============================================================================
--- libcxxabi/trunk/src/cxa_unexpected.cpp (added)
+++ libcxxabi/trunk/src/cxa_unexpected.cpp Wed Jan 25 13:27:42 2012
@@ -0,0 +1,27 @@
+//===------------------------- cxa_unexpected.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.
+//
+//===----------------------------------------------------------------------===//
+
+#include <exception>
+
+#pragma GCC visibility push(default)
+
+extern "C"
+{
+
+__attribute__((noreturn))
+void
+__cxa_call_unexpected (void*)
+{
+    // TODO:  Completely unfinished!
+    std::terminate();
+}
+
+}
+
+#pragma GCC visibility pop

Modified: libcxxabi/trunk/src/private_typeinfo.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/private_typeinfo.cpp?rev=148967&r1=148966&r2=148967&view=diff
==============================================================================
--- libcxxabi/trunk/src/private_typeinfo.cpp (original)
+++ libcxxabi/trunk/src/private_typeinfo.cpp Wed Jan 25 13:27:42 2012
@@ -16,7 +16,7 @@
 namespace __cxxabiv1
 {
 
-#pragma GCC visibility push(hidden)
+//#pragma GCC visibility push(hidden)
 
 // __shim_type_info
 
@@ -88,6 +88,8 @@
 {
 }
 
+#pragma GCC visibility push(hidden)
+
 #ifdef DEBUG
 
 void
@@ -427,7 +429,7 @@
     return false;
 }
 
-#pragma GCC visibility pop
+//#pragma GCC visibility pop
 #pragma GCC visibility push(default)
 
 // __dynamic_cast

Modified: libcxxabi/trunk/src/private_typeinfo.h
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/private_typeinfo.h?rev=148967&r1=148966&r2=148967&view=diff
==============================================================================
--- libcxxabi/trunk/src/private_typeinfo.h (original)
+++ libcxxabi/trunk/src/private_typeinfo.h Wed Jan 25 13:27:42 2012
@@ -16,7 +16,7 @@
 namespace __cxxabiv1
 {
 
-#pragma GCC visibility push(hidden)
+//#pragma GCC visibility push(hidden)
 
 class __shim_type_info
     : public std::type_info
@@ -259,7 +259,7 @@
 #endif
 };
 
-#pragma GCC visibility pop
+//#pragma GCC visibility pop
 
 }  // __cxxabiv1
 

Added: libcxxabi/trunk/src/temporary.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/temporary.cpp?rev=148967&view=auto
==============================================================================
--- libcxxabi/trunk/src/temporary.cpp (added)
+++ libcxxabi/trunk/src/temporary.cpp Wed Jan 25 13:27:42 2012
@@ -0,0 +1,21 @@
+//===---------------------------- temporary.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.
+//
+//===----------------------------------------------------------------------===//
+
+#pragma GCC visibility push(default)
+
+extern "C"
+{
+
+void (*__cxa_new_handler)() = 0;
+void (*__cxa_terminate_handler)() = 0;
+void (*__cxa_unexpected_handler)() = 0;
+
+}
+
+#pragma GCC visibility pop





More information about the cfe-commits mailing list