[cfe-commits] [PATCH] [libc++] do not define exception handlers when building with supc++

Saleem Abdulrasool compnerd at compnerd.org
Mon Jan 21 19:01:52 PST 2013


__terminate_handler and __unexpected_handler are defined but not used when
building against libsupc++ as the functions for which they are used are provided
by libsupc++.  Simply preprocess them away when building against libsupc++.

http://llvm-reviews.chandlerc.com/D317

Files:
  src/exception.cpp

Index: src/exception.cpp
===================================================================
--- src/exception.cpp
+++ src/exception.cpp
@@ -33,7 +33,7 @@
   #if defined(LIBCXXRT) || defined(_LIBCPPABI_VERSION)
     #define HAVE_DEPENDENT_EH_ABI 1
   #endif
-#else  // __has_include(<cxxabi.h>)
+#elif !defined(__GLIBCXX__) // __has_include(<cxxabi.h>)
   static std::terminate_handler  __terminate_handler;
   static std::unexpected_handler __unexpected_handler;
 #endif // __has_include(<cxxabi.h>)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D317.1.patch
Type: text/x-patch
Size: 501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130121/b0f8d148/attachment.bin>


More information about the cfe-commits mailing list