<div dir="ltr">Alright. Reverting...</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 10, 2017 at 12:48 AM, Vitaly Buka <span dir="ltr"><<a href="mailto:vitalybuka@google.com" target="_blank">vitalybuka@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr" class="m_4779842885532831843gmail_msg">As I understand it's not the builder but cmake files of compiler-rt need to be fixed, somewhere near add_custom_libcxx in tsan and msan.</div><div dir="ltr" class="m_4779842885532831843gmail_msg">Something just like this should work, but it's broken after the patch.<br><div class="m_4779842885532831843gmail_msg"><div class="m_4779842885532831843gmail_msg">cmake -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ../../llvm && ninja check-tsan check-msan</div><div class="m_4779842885532831843gmail_msg"><br></div><div class="m_4779842885532831843gmail_msg">Seems reasonable thing to do is to revert and resubmit together with fixed compiler-rt.</div></div></div><div><div class="h5"><br class="m_4779842885532831843gmail_msg"><div class="gmail_quote m_4779842885532831843gmail_msg"><div dir="ltr" class="m_4779842885532831843gmail_msg">On Thu, Feb 9, 2017 at 10:04 PM Vitaly Buka <<a href="mailto:vitalybuka@google.com" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">vitalybuka@google.com</a>> wrote:<br class="m_4779842885532831843gmail_msg"></div><blockquote class="gmail_quote m_4779842885532831843gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="m_4779842885532831843gmail_msg">Thanks.<div class="m_4779842885532831843gmail_msg">looking...</div></div><br class="m_4779842885532831843gmail_msg"><div class="gmail_quote m_4779842885532831843gmail_msg"><div dir="ltr" class="m_4779842885532831843gmail_msg">On Thu, Feb 9, 2017 at 9:51 PM Eric Fiselier <<a href="mailto:eric@efcs.ca" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">eric@efcs.ca</a>> wrote:<br class="m_4779842885532831843gmail_msg"></div><blockquote class="gmail_quote m_4779842885532831843gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="m_4779842885532831843gmail_msg">To all those who wander here from the <a href="http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">sanitizer autoconf buildbot failures</a>.<div class="m_4779842885532831843gmail_msg"><br class="m_4779842885532831843gmail_msg"></div><div class="m_4779842885532831843gmail_msg">Yes, this commit is responsible for that breakage. The buildbot in question</div><div class="m_4779842885532831843gmail_msg">attempts to compile libc++ in-tree w/o libc++abi. Previously libc++ silently defaulted</div><div class="m_4779842885532831843gmail_msg">to using w/e <cxxabi.h> header it found on the system. However it no longer does this</div><div class="m_4779842885532831843gmail_msg">on Linux, since the <cxxabi.h> header it finds could incorrectly belong to libstdc++ or libcxxrt.</div><div class="m_4779842885532831843gmail_msg"><br class="m_4779842885532831843gmail_msg"></div><div class="m_4779842885532831843gmail_msg">Instead this builder should be changed to either:</div><div class="m_4779842885532831843gmail_msg"><br class="m_4779842885532831843gmail_msg"></div><div class="m_4779842885532831843gmail_msg">(A) build libc++abi in-tree as well.</div><div class="m_4779842885532831843gmail_msg">(B) explicitly specify -DLIBCXX_CXX_ABI=libcxxabi -DLIBCXX_CXX_ABI_INCLUDE_<wbr>PATHS="<path-to-installed-<wbr>headers>".</div><div class="m_4779842885532831843gmail_msg"><br class="m_4779842885532831843gmail_msg"></div><div class="m_4779842885532831843gmail_msg">If these changes cannot be made easily and quickly then please let me know, and I'll implement a temporary workaround in</div><div class="m_4779842885532831843gmail_msg">libc++.</div></div><div dir="ltr" class="m_4779842885532831843gmail_msg"><div class="m_4779842885532831843gmail_msg"><br class="m_4779842885532831843gmail_msg"></div><div class="m_4779842885532831843gmail_msg"><br class="m_4779842885532831843gmail_msg"></div><div class="m_4779842885532831843gmail_msg">/Eric</div><div class="m_4779842885532831843gmail_msg"><br class="m_4779842885532831843gmail_msg"></div></div><div class="gmail_extra m_4779842885532831843gmail_msg"><br class="m_4779842885532831843gmail_msg"><div class="gmail_quote m_4779842885532831843gmail_msg">On Thu, Feb 9, 2017 at 9:25 PM, Eric Fiselier via cfe-commits <span dir="ltr" class="m_4779842885532831843gmail_msg"><<a href="mailto:cfe-commits@lists.llvm.org" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br class="m_4779842885532831843gmail_msg"><blockquote class="gmail_quote m_4779842885532831843gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ericwf<br class="m_4779842885532831843gmail_msg">
Date: Thu Feb  9 22:25:33 2017<br class="m_4779842885532831843gmail_msg">
New Revision: 294707<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=294707&view=rev" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=294707&view=rev</a><br class="m_4779842885532831843gmail_msg">
Log:<br class="m_4779842885532831843gmail_msg">
Split exception.cpp and new.cpp implementation into different files for different runtimes.<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
exception.cpp is a bloody mess. It's full of confusing #ifdef branches for<br class="m_4779842885532831843gmail_msg">
each different ABI library we support, and it's getting unmaintainable.<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
This patch breaks down exception.cpp into multiple different header files,<br class="m_4779842885532831843gmail_msg">
roughly one per implementation. Additionally it moves the definitions of<br class="m_4779842885532831843gmail_msg">
exceptions in new.cpp into the correct implementation header.<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
This patch also removes an unmaintained libc++abi configuration.<br class="m_4779842885532831843gmail_msg">
This configuration may still be used by Apple internally but there<br class="m_4779842885532831843gmail_msg">
are no other possible users. If it turns out that Apple still uses<br class="m_4779842885532831843gmail_msg">
this configuration internally I will re-add it in a later commit.<br class="m_4779842885532831843gmail_msg">
See <a href="http://llvm.org/PR31904" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://llvm.org/PR31904</a>.<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
Added:<br class="m_4779842885532831843gmail_msg">
    libcxx/trunk/src/support/<wbr>runtime/<br class="m_4779842885532831843gmail_msg">
    libcxx/trunk/src/support/<wbr>runtime/exception_fallback.ipp<br class="m_4779842885532831843gmail_msg">
    libcxx/trunk/src/support/<wbr>runtime/exception_glibcxx.ipp<br class="m_4779842885532831843gmail_msg">
    libcxx/trunk/src/support/<wbr>runtime/exception_libcxxabi.<wbr>ipp<br class="m_4779842885532831843gmail_msg">
    libcxx/trunk/src/support/<wbr>runtime/exception_libcxxrt.ipp<br class="m_4779842885532831843gmail_msg">
    libcxx/trunk/src/support/<wbr>runtime/exception_msvc.ipp<br class="m_4779842885532831843gmail_msg">
    libcxx/trunk/src/support/<wbr>runtime/exception_pointer_<wbr>cxxabi.ipp<br class="m_4779842885532831843gmail_msg">
    libcxx/trunk/src/support/<wbr>runtime/exception_pointer_<wbr>glibcxx.ipp<br class="m_4779842885532831843gmail_msg">
    libcxx/trunk/src/support/<wbr>runtime/exception_pointer_<wbr>unimplemented.ipp<br class="m_4779842885532831843gmail_msg">
    libcxx/trunk/src/support/<wbr>runtime/new_handler_fallback.<wbr>ipp<br class="m_4779842885532831843gmail_msg">
Modified:<br class="m_4779842885532831843gmail_msg">
    libcxx/trunk/CMakeLists.txt<br class="m_4779842885532831843gmail_msg">
    libcxx/trunk/include/exception<br class="m_4779842885532831843gmail_msg">
    libcxx/trunk/include/new<br class="m_4779842885532831843gmail_msg">
    libcxx/trunk/include/typeinfo<br class="m_4779842885532831843gmail_msg">
    libcxx/trunk/src/exception.cpp<br class="m_4779842885532831843gmail_msg">
    libcxx/trunk/src/new.cpp<br class="m_4779842885532831843gmail_msg">
    libcxx/trunk/src/typeinfo.cpp<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
Modified: libcxx/trunk/CMakeLists.txt<br class="m_4779842885532831843gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=294707&r1=294706&r2=294707&view=diff" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/<wbr>CMakeLists.txt?rev=294707&r1=<wbr>294706&r2=294707&view=diff</a><br class="m_4779842885532831843gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_4779842885532831843gmail_msg">
--- libcxx/trunk/CMakeLists.txt (original)<br class="m_4779842885532831843gmail_msg">
+++ libcxx/trunk/CMakeLists.txt Thu Feb  9 22:25:33 2017<br class="m_4779842885532831843gmail_msg">
@@ -116,11 +116,19 @@ if (LIBCXX_CXX_ABI STREQUAL "default")<br class="m_4779842885532831843gmail_msg">
           ${LLVM_MAIN_SRC_DIR}/<wbr>runtimes/libcxxabi/include<br class="m_4779842885532831843gmail_msg">
     NO_DEFAULT_PATH<br class="m_4779842885532831843gmail_msg">
   )<br class="m_4779842885532831843gmail_msg">
+  find_path(<br class="m_4779842885532831843gmail_msg">
+    LIBCXX_LIBCXXABI_INCLUDES_<wbr>EXTERNAL<br class="m_4779842885532831843gmail_msg">
+    cxxabi.h<br class="m_4779842885532831843gmail_msg">
+    PATHS /usr/include<br class="m_4779842885532831843gmail_msg">
+  )<br class="m_4779842885532831843gmail_msg">
   if ((NOT LIBCXX_STANDALONE_BUILD OR HAVE_LIBCXXABI) AND<br class="m_4779842885532831843gmail_msg">
       IS_DIRECTORY "${LIBCXX_LIBCXXABI_INCLUDES_<wbr>INTERNAL}")<br class="m_4779842885532831843gmail_msg">
     set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")<br class="m_4779842885532831843gmail_msg">
     set(LIBCXX_CXX_ABI_INCLUDE_<wbr>PATHS "${LIBCXX_LIBCXXABI_INCLUDES_<wbr>INTERNAL}")<br class="m_4779842885532831843gmail_msg">
     set(LIBCXX_CXX_ABI_INTREE 1)<br class="m_4779842885532831843gmail_msg">
+  elseif(APPLE AND IS_DIRECTORY "${LIBCXX_LIBCXXABI_INCLUDES_<wbr>INTERNAL}")<br class="m_4779842885532831843gmail_msg">
+    set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")<br class="m_4779842885532831843gmail_msg">
+    set(LIBCXX_CXX_ABI_INCLUDE_<wbr>PATHS "${LIBCXX_LIBCXXABI_INCLUDES_<wbr>INTERNAL}")<br class="m_4779842885532831843gmail_msg">
   else()<br class="m_4779842885532831843gmail_msg">
     if (LIBCXX_TARGETING_MSVC)<br class="m_4779842885532831843gmail_msg">
       # FIXME: Figure out how to configure the ABI library on Windows.<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
Modified: libcxx/trunk/include/exception<br class="m_4779842885532831843gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/exception?rev=294707&r1=294706&r2=294707&view=diff" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/include/<wbr>exception?rev=294707&r1=<wbr>294706&r2=294707&view=diff</a><br class="m_4779842885532831843gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_4779842885532831843gmail_msg">
--- libcxx/trunk/include/exception (original)<br class="m_4779842885532831843gmail_msg">
+++ libcxx/trunk/include/exception Thu Feb  9 22:25:33 2017<br class="m_4779842885532831843gmail_msg">
@@ -82,6 +82,10 @@ template <class E> void rethrow_if_neste<br class="m_4779842885532831843gmail_msg">
 #include <cstdlib><br class="m_4779842885532831843gmail_msg">
 #include <type_traits><br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
+#if defined(_LIBCPP_ABI_MICROSOFT)<br class="m_4779842885532831843gmail_msg">
+#include <vcruntime_exception.h><br class="m_4779842885532831843gmail_msg">
+#endif<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
 #if !defined(_LIBCPP_HAS_NO_<wbr>PRAGMA_SYSTEM_HEADER)<br class="m_4779842885532831843gmail_msg">
 #pragma GCC system_header<br class="m_4779842885532831843gmail_msg">
 #endif<br class="m_4779842885532831843gmail_msg">
@@ -89,6 +93,7 @@ template <class E> void rethrow_if_neste<br class="m_4779842885532831843gmail_msg">
 namespace std  // purposefully not using versioning namespace<br class="m_4779842885532831843gmail_msg">
 {<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
+#if !defined(_LIBCPP_ABI_<wbr>MICROSOFT)<br class="m_4779842885532831843gmail_msg">
 class _LIBCPP_EXCEPTION_ABI exception<br class="m_4779842885532831843gmail_msg">
 {<br class="m_4779842885532831843gmail_msg">
 public:<br class="m_4779842885532831843gmail_msg">
@@ -105,6 +110,7 @@ public:<br class="m_4779842885532831843gmail_msg">
     virtual ~bad_exception() _NOEXCEPT;<br class="m_4779842885532831843gmail_msg">
     virtual const char* what() const _NOEXCEPT;<br class="m_4779842885532831843gmail_msg">
 };<br class="m_4779842885532831843gmail_msg">
+#endif // !_LIBCPP_ABI_MICROSOFT<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
 typedef void (*unexpected_handler)();<br class="m_4779842885532831843gmail_msg">
 _LIBCPP_FUNC_VIS unexpected_handler set_unexpected(unexpected_<wbr>handler) _NOEXCEPT;<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
Modified: libcxx/trunk/include/new<br class="m_4779842885532831843gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/new?rev=294707&r1=294706&r2=294707&view=diff" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/include/<wbr>new?rev=294707&r1=294706&r2=<wbr>294707&view=diff</a><br class="m_4779842885532831843gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_4779842885532831843gmail_msg">
--- libcxx/trunk/include/new (original)<br class="m_4779842885532831843gmail_msg">
+++ libcxx/trunk/include/new Thu Feb  9 22:25:33 2017<br class="m_4779842885532831843gmail_msg">
@@ -92,6 +92,10 @@ void  operator delete[](void* ptr, void*<br class="m_4779842885532831843gmail_msg">
 #include <cstdlib><br class="m_4779842885532831843gmail_msg">
 #endif<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
+#if defined(_LIBCPP_ABI_MICROSOFT)<br class="m_4779842885532831843gmail_msg">
+#include <new.h><br class="m_4779842885532831843gmail_msg">
+#endif<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
 #if !defined(_LIBCPP_HAS_NO_<wbr>PRAGMA_SYSTEM_HEADER)<br class="m_4779842885532831843gmail_msg">
 #pragma GCC system_header<br class="m_4779842885532831843gmail_msg">
 #endif<br class="m_4779842885532831843gmail_msg">
@@ -110,6 +114,10 @@ void  operator delete[](void* ptr, void*<br class="m_4779842885532831843gmail_msg">
 namespace std  // purposefully not using versioning namespace<br class="m_4779842885532831843gmail_msg">
 {<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
+#if !defined(_LIBCPP_ABI_<wbr>MICROSOFT)<br class="m_4779842885532831843gmail_msg">
+struct _LIBCPP_TYPE_VIS nothrow_t {};<br class="m_4779842885532831843gmail_msg">
+extern _LIBCPP_FUNC_VIS const nothrow_t nothrow;<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
 class _LIBCPP_EXCEPTION_ABI bad_alloc<br class="m_4779842885532831843gmail_msg">
     : public exception<br class="m_4779842885532831843gmail_msg">
 {<br class="m_4779842885532831843gmail_msg">
@@ -128,6 +136,12 @@ public:<br class="m_4779842885532831843gmail_msg">
     virtual const char* what() const _NOEXCEPT;<br class="m_4779842885532831843gmail_msg">
 };<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
+typedef void (*new_handler)();<br class="m_4779842885532831843gmail_msg">
+_LIBCPP_FUNC_VIS new_handler set_new_handler(new_handler) _NOEXCEPT;<br class="m_4779842885532831843gmail_msg">
+_LIBCPP_FUNC_VIS new_handler get_new_handler() _NOEXCEPT;<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+#endif // !_LIBCPP_ABI_MICROSOFT<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
 _LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_bad_alloc();  // not in C++ spec<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
 #if defined(_LIBCPP_BUILDING_NEW) || (_LIBCPP_STD_VER > 11)<br class="m_4779842885532831843gmail_msg">
@@ -153,12 +167,6 @@ enum align_val_t { __zero = 0, __max = (<br class="m_4779842885532831843gmail_msg">
 #endif<br class="m_4779842885532831843gmail_msg">
 #endif<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
-struct _LIBCPP_TYPE_VIS nothrow_t {};<br class="m_4779842885532831843gmail_msg">
-extern _LIBCPP_FUNC_VIS const nothrow_t nothrow;<br class="m_4779842885532831843gmail_msg">
-typedef void (*new_handler)();<br class="m_4779842885532831843gmail_msg">
-_LIBCPP_FUNC_VIS new_handler set_new_handler(new_handler) _NOEXCEPT;<br class="m_4779842885532831843gmail_msg">
-_LIBCPP_FUNC_VIS new_handler get_new_handler() _NOEXCEPT;<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
 }  // std<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
 #if defined(_LIBCPP_CXX03_LANG)<br class="m_4779842885532831843gmail_msg">
@@ -167,6 +175,8 @@ _LIBCPP_FUNC_VIS new_handler get_new_han<br class="m_4779842885532831843gmail_msg">
 #define _THROW_BAD_ALLOC<br class="m_4779842885532831843gmail_msg">
 #endif<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
+#if !defined(_LIBCPP_ABI_<wbr>MICROSOFT)<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz) _THROW_BAD_ALLOC;<br class="m_4779842885532831843gmail_msg">
 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _NOALIAS;<br class="m_4779842885532831843gmail_msg">
 _LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p) _NOEXCEPT;<br class="m_4779842885532831843gmail_msg">
@@ -206,6 +216,8 @@ inline _LIBCPP_INLINE_VISIBILITY void* o<br class="m_4779842885532831843gmail_msg">
 inline _LIBCPP_INLINE_VISIBILITY void  operator delete  (void*, void*) _NOEXCEPT {}<br class="m_4779842885532831843gmail_msg">
 inline _LIBCPP_INLINE_VISIBILITY void  operator delete[](void*, void*) _NOEXCEPT {}<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
+#endif // !_LIBCPP_ABI_MICROSOFT<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
 _LIBCPP_BEGIN_NAMESPACE_STD<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
 inline _LIBCPP_INLINE_VISIBILITY void *__allocate(size_t __size) {<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
Modified: libcxx/trunk/include/typeinfo<br class="m_4779842885532831843gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/typeinfo?rev=294707&r1=294706&r2=294707&view=diff" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/include/<wbr>typeinfo?rev=294707&r1=294706&<wbr>r2=294707&view=diff</a><br class="m_4779842885532831843gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_4779842885532831843gmail_msg">
--- libcxx/trunk/include/typeinfo (original)<br class="m_4779842885532831843gmail_msg">
+++ libcxx/trunk/include/typeinfo Thu Feb  9 22:25:33 2017<br class="m_4779842885532831843gmail_msg">
@@ -69,7 +69,9 @@ public:<br class="m_4779842885532831843gmail_msg">
 #pragma GCC system_header<br class="m_4779842885532831843gmail_msg">
 #endif<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
-#if defined(_LIBCPP_NONUNIQUE_<wbr>RTTI_BIT)<br class="m_4779842885532831843gmail_msg">
+#if defined(_LIBCPP_ABI_MICROSOFT)<br class="m_4779842885532831843gmail_msg">
+#include <vcruntime_typeinfo.h><br class="m_4779842885532831843gmail_msg">
+#elif defined(_LIBCPP_NONUNIQUE_<wbr>RTTI_BIT)<br class="m_4779842885532831843gmail_msg">
 #define _LIBCPP_HAS_NONUNIQUE_TYPEINFO<br class="m_4779842885532831843gmail_msg">
 #else<br class="m_4779842885532831843gmail_msg">
 #define _LIBCPP_HAS_UNIQUE_TYPEINFO<br class="m_4779842885532831843gmail_msg">
@@ -78,6 +80,7 @@ public:<br class="m_4779842885532831843gmail_msg">
 namespace std  // purposefully not using versioning namespace<br class="m_4779842885532831843gmail_msg">
 {<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
+#if !defined(_LIBCPP_ABI_<wbr>MICROSOFT)<br class="m_4779842885532831843gmail_msg">
 class _LIBCPP_EXCEPTION_ABI type_info<br class="m_4779842885532831843gmail_msg">
 {<br class="m_4779842885532831843gmail_msg">
     type_info& operator=(const type_info&);<br class="m_4779842885532831843gmail_msg">
@@ -187,6 +190,8 @@ public:<br class="m_4779842885532831843gmail_msg">
     virtual const char* what() const _NOEXCEPT;<br class="m_4779842885532831843gmail_msg">
 };<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
+#endif // !_LIBCPP_ABI_MICROSOFT<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
 }  // std<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
 _LIBCPP_BEGIN_NAMESPACE_STD<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
Modified: libcxx/trunk/src/exception.cpp<br class="m_4779842885532831843gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/exception.cpp?rev=294707&r1=294706&r2=294707&view=diff" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/src/<wbr>exception.cpp?rev=294707&r1=<wbr>294706&r2=294707&view=diff</a><br class="m_4779842885532831843gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_4779842885532831843gmail_msg">
--- libcxx/trunk/src/exception.cpp (original)<br class="m_4779842885532831843gmail_msg">
+++ libcxx/trunk/src/exception.cpp Thu Feb  9 22:25:33 2017<br class="m_4779842885532831843gmail_msg">
@@ -6,328 +6,30 @@<br class="m_4779842885532831843gmail_msg">
 // Source Licenses. See LICENSE.TXT for details.<br class="m_4779842885532831843gmail_msg">
 //<br class="m_4779842885532831843gmail_msg">
 //===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
-#include <stdlib.h><br class="m_4779842885532831843gmail_msg">
-#include <stdio.h><br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
 #include "exception"<br class="m_4779842885532831843gmail_msg">
 #include "new"<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
-#if defined(_LIBCPP_ABI_MICROSOFT)<br class="m_4779842885532831843gmail_msg">
-#include <eh.h><br class="m_4779842885532831843gmail_msg">
-#include <corecrt_terminate.h><br class="m_4779842885532831843gmail_msg">
-#elif defined(__APPLE__) && !defined(LIBCXXRT) && \<br class="m_4779842885532831843gmail_msg">
-    !defined(_LIBCPP_BUILDING_HAS_<wbr>NO_ABI_LIBRARY)<br class="m_4779842885532831843gmail_msg">
+#if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_<wbr>LIBCXXABI) || \<br class="m_4779842885532831843gmail_msg">
+  (defined(__APPLE__) && !defined(_LIBCPP_BUILDING_HAS_<wbr>NO_ABI_LIBRARY))<br class="m_4779842885532831843gmail_msg">
   #include <cxxabi.h><br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
   using namespace __cxxabiv1;<br class="m_4779842885532831843gmail_msg">
   #define HAVE_DEPENDENT_EH_ABI 1<br class="m_4779842885532831843gmail_msg">
-  #ifndef _LIBCPPABI_VERSION<br class="m_4779842885532831843gmail_msg">
-    using namespace __cxxabiapple;<br class="m_4779842885532831843gmail_msg">
-    // On Darwin, there are two STL shared libraries and a lower level ABI<br class="m_4779842885532831843gmail_msg">
-    // shared library.  The globals holding the current terminate handler and<br class="m_4779842885532831843gmail_msg">
-    // current unexpected handler are in the ABI library.<br class="m_4779842885532831843gmail_msg">
-    #define __terminate_handler  __cxxabiapple::__cxa_<wbr>terminate_handler<br class="m_4779842885532831843gmail_msg">
-    #define __unexpected_handler __cxxabiapple::__cxa_<wbr>unexpected_handler<br class="m_4779842885532831843gmail_msg">
-  #endif  // _LIBCPPABI_VERSION<br class="m_4779842885532831843gmail_msg">
-#elif defined(LIBCXXRT) || defined(LIBCXX_BUILDING_<wbr>LIBCXXABI)<br class="m_4779842885532831843gmail_msg">
-  #include <cxxabi.h><br class="m_4779842885532831843gmail_msg">
-  using namespace __cxxabiv1;<br class="m_4779842885532831843gmail_msg">
-  #if defined(LIBCXXRT) || defined(_LIBCPPABI_VERSION)<br class="m_4779842885532831843gmail_msg">
-    #define HAVE_DEPENDENT_EH_ABI 1<br class="m_4779842885532831843gmail_msg">
-  #endif<br class="m_4779842885532831843gmail_msg">
-#elif !defined(__GLIBCXX__) // defined(LIBCXX_BUILDING_<wbr>LIBCXXABI)<br class="m_4779842885532831843gmail_msg">
-  _LIBCPP_SAFE_STATIC static std::terminate_handler  __terminate_handler;<br class="m_4779842885532831843gmail_msg">
-  _LIBCPP_SAFE_STATIC static std::unexpected_handler __unexpected_handler;<br class="m_4779842885532831843gmail_msg">
-#endif // defined(LIBCXX_BUILDING_<wbr>LIBCXXABI)<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-namespace std<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#if !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__)<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-// libcxxrt provides implementations of these functions itself.<br class="m_4779842885532831843gmail_msg">
-unexpected_handler<br class="m_4779842885532831843gmail_msg">
-set_unexpected(unexpected_<wbr>handler func) _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-#if defined(_LIBCPP_ABI_MICROSOFT)<br class="m_4779842885532831843gmail_msg">
-  return ::set_unexpected(func);<br class="m_4779842885532831843gmail_msg">
-#else<br class="m_4779842885532831843gmail_msg">
-  return __sync_lock_test_and_set(&__<wbr>unexpected_handler, func);<br class="m_4779842885532831843gmail_msg">
-#endif<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-unexpected_handler<br class="m_4779842885532831843gmail_msg">
-get_unexpected() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-#if defined(_LIBCPP_ABI_MICROSOFT)<br class="m_4779842885532831843gmail_msg">
-  return ::_get_unexpected();<br class="m_4779842885532831843gmail_msg">
-#else<br class="m_4779842885532831843gmail_msg">
-  return __sync_fetch_and_add(&__<wbr>unexpected_handler, (unexpected_handler)0);<br class="m_4779842885532831843gmail_msg">
-#endif<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-_LIBCPP_NORETURN<br class="m_4779842885532831843gmail_msg">
-void<br class="m_4779842885532831843gmail_msg">
-unexpected()<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-    (*get_unexpected())();<br class="m_4779842885532831843gmail_msg">
-    // unexpected handler should not return<br class="m_4779842885532831843gmail_msg">
-    terminate();<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-terminate_handler<br class="m_4779842885532831843gmail_msg">
-set_terminate(terminate_<wbr>handler func) _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-#if defined(_LIBCPP_ABI_MICROSOFT)<br class="m_4779842885532831843gmail_msg">
-  return ::set_terminate(func);<br class="m_4779842885532831843gmail_msg">
-#else<br class="m_4779842885532831843gmail_msg">
-  return __sync_lock_test_and_set(&__<wbr>terminate_handler, func);<br class="m_4779842885532831843gmail_msg">
 #endif<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
-terminate_handler<br class="m_4779842885532831843gmail_msg">
-get_terminate() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
 #if defined(_LIBCPP_ABI_MICROSOFT)<br class="m_4779842885532831843gmail_msg">
-  return ::_get_terminate();<br class="m_4779842885532831843gmail_msg">
-#else<br class="m_4779842885532831843gmail_msg">
-  return __sync_fetch_and_add(&__<wbr>terminate_handler, (terminate_handler)0);<br class="m_4779842885532831843gmail_msg">
-#endif<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#ifndef __EMSCRIPTEN__ // We provide this in JS<br class="m_4779842885532831843gmail_msg">
-_LIBCPP_NORETURN<br class="m_4779842885532831843gmail_msg">
-void<br class="m_4779842885532831843gmail_msg">
-terminate() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-#ifndef _LIBCPP_NO_EXCEPTIONS<br class="m_4779842885532831843gmail_msg">
-    try<br class="m_4779842885532831843gmail_msg">
-    {<br class="m_4779842885532831843gmail_msg">
-#endif  // _LIBCPP_NO_EXCEPTIONS<br class="m_4779842885532831843gmail_msg">
-        (*get_terminate())();<br class="m_4779842885532831843gmail_msg">
-        // handler should not return<br class="m_4779842885532831843gmail_msg">
-        fprintf(stderr, "terminate_handler unexpectedly returned\n");<br class="m_4779842885532831843gmail_msg">
-        ::abort();<br class="m_4779842885532831843gmail_msg">
-#ifndef _LIBCPP_NO_EXCEPTIONS<br class="m_4779842885532831843gmail_msg">
-    }<br class="m_4779842885532831843gmail_msg">
-    catch (...)<br class="m_4779842885532831843gmail_msg">
-    {<br class="m_4779842885532831843gmail_msg">
-        // handler should not throw exception<br class="m_4779842885532831843gmail_msg">
-        fprintf(stderr, "terminate_handler unexpectedly threw an exception\n");<br class="m_4779842885532831843gmail_msg">
-        ::abort();<br class="m_4779842885532831843gmail_msg">
-    }<br class="m_4779842885532831843gmail_msg">
-#endif  // _LIBCPP_NO_EXCEPTIONS<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-#endif // !__EMSCRIPTEN__<br class="m_4779842885532831843gmail_msg">
-#endif // !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION)<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#if !defined(LIBCXXRT) && !defined(__GLIBCXX__) && !defined(__EMSCRIPTEN__)<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-bool uncaught_exception() _NOEXCEPT { return uncaught_exceptions() > 0; }<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-int uncaught_exceptions() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-#if !defined(_LIBCPP_BUILDING_HAS_<wbr>NO_ABI_LIBRARY) && \<br class="m_4779842885532831843gmail_msg">
-    (defined(__APPLE__) || defined(_LIBCPPABI_VERSION))<br class="m_4779842885532831843gmail_msg">
-   // on Darwin, there is a helper function so __cxa_get_globals is private<br class="m_4779842885532831843gmail_msg">
-# if _LIBCPPABI_VERSION > 1101<br class="m_4779842885532831843gmail_msg">
-    return __cxa_uncaught_exceptions();<br class="m_4779842885532831843gmail_msg">
-# else<br class="m_4779842885532831843gmail_msg">
-    return __cxa_uncaught_exception() ? 1 : 0;<br class="m_4779842885532831843gmail_msg">
-# endif<br class="m_4779842885532831843gmail_msg">
-#elif defined(_LIBCPP_ABI_MICROSOFT)<br class="m_4779842885532831843gmail_msg">
-    return __uncaught_exceptions();<br class="m_4779842885532831843gmail_msg">
-#else<br class="m_4779842885532831843gmail_msg">
-#   if defined(_LIBCPP_MSVC)<br class="m_4779842885532831843gmail_msg">
-        _LIBCPP_WARNING("uncaught_<wbr>exceptions not yet implemented")<br class="m_4779842885532831843gmail_msg">
-#   else<br class="m_4779842885532831843gmail_msg">
-#       warning uncaught_exception not yet implemented<br class="m_4779842885532831843gmail_msg">
-#   endif<br class="m_4779842885532831843gmail_msg">
-    fprintf(stderr, "uncaught_exceptions not yet implemented\n");<br class="m_4779842885532831843gmail_msg">
-    ::abort();<br class="m_4779842885532831843gmail_msg">
-#endif  // __APPLE__<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#ifndef _LIBCPPABI_VERSION<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-exception::~exception() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-const char* exception::what() const _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-  return "std::exception";<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#endif  // _LIBCPPABI_VERSION<br class="m_4779842885532831843gmail_msg">
-#endif //LIBCXXRT<br class="m_4779842885532831843gmail_msg">
-#if !defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__)<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-bad_exception::~bad_<wbr>exception() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-const char* bad_exception::what() const _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-  return "std::bad_exception";<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#endif<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#if defined(__GLIBCXX__)<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-// libsupc++ does not implement the dependent EH ABI and the functionality<br class="m_4779842885532831843gmail_msg">
-// it uses to implement std::exception_ptr (which it declares as an alias of<br class="m_4779842885532831843gmail_msg">
-// std::__exception_ptr::<wbr>exception_ptr) is not directly exported to clients. So<br class="m_4779842885532831843gmail_msg">
-// we have little choice but to hijack std::__exception_ptr::<wbr>exception_ptr's<br class="m_4779842885532831843gmail_msg">
-// (which fortunately has the same layout as our std::exception_ptr) copy<br class="m_4779842885532831843gmail_msg">
-// constructor, assignment operator and destructor (which are part of its<br class="m_4779842885532831843gmail_msg">
-// stable ABI), and its rethrow_exception(std::__<wbr>exception_ptr::exception_ptr)<br class="m_4779842885532831843gmail_msg">
-// function.<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-namespace __exception_ptr<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-struct exception_ptr<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-    void* __ptr_;<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-    exception_ptr(const exception_ptr&) _NOEXCEPT;<br class="m_4779842885532831843gmail_msg">
-    exception_ptr& operator=(const exception_ptr&) _NOEXCEPT;<br class="m_4779842885532831843gmail_msg">
-    ~exception_ptr() _NOEXCEPT;<br class="m_4779842885532831843gmail_msg">
-};<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-_LIBCPP_NORETURN void rethrow_exception(__exception_<wbr>ptr::exception_ptr);<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#endif<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-exception_ptr::~exception_<wbr>ptr() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-#if HAVE_DEPENDENT_EH_ABI<br class="m_4779842885532831843gmail_msg">
-    __cxa_decrement_exception_<wbr>refcount(__ptr_);<br class="m_4779842885532831843gmail_msg">
-#elif defined(__GLIBCXX__)<br class="m_4779842885532831843gmail_msg">
-    reinterpret_cast<__exception_<wbr>ptr::exception_ptr*>(this)->~<wbr>exception_ptr();<br class="m_4779842885532831843gmail_msg">
-#else<br class="m_4779842885532831843gmail_msg">
-#   if defined(_LIBCPP_MSVC)<br class="m_4779842885532831843gmail_msg">
-        _LIBCPP_WARNING("exception_ptr not yet implemented")<br class="m_4779842885532831843gmail_msg">
-#   else<br class="m_4779842885532831843gmail_msg">
-#       warning exception_ptr not yet implemented<br class="m_4779842885532831843gmail_msg">
-#   endif<br class="m_4779842885532831843gmail_msg">
-    fprintf(stderr, "exception_ptr not yet implemented\n");<br class="m_4779842885532831843gmail_msg">
-    ::abort();<br class="m_4779842885532831843gmail_msg">
-#endif<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-exception_ptr::exception_ptr(<wbr>const exception_ptr& other) _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-    : __ptr_(other.__ptr_)<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-#if HAVE_DEPENDENT_EH_ABI<br class="m_4779842885532831843gmail_msg">
-    __cxa_increment_exception_<wbr>refcount(__ptr_);<br class="m_4779842885532831843gmail_msg">
-#elif defined(__GLIBCXX__)<br class="m_4779842885532831843gmail_msg">
-    new (reinterpret_cast<void*>(this)<wbr>) __exception_ptr::exception_<wbr>ptr(<br class="m_4779842885532831843gmail_msg">
-        reinterpret_cast<const __exception_ptr::exception_<wbr>ptr&>(other));<br class="m_4779842885532831843gmail_msg">
-#else<br class="m_4779842885532831843gmail_msg">
-#   if defined(_LIBCPP_MSVC)<br class="m_4779842885532831843gmail_msg">
-        _LIBCPP_WARNING("exception_ptr not yet implemented")<br class="m_4779842885532831843gmail_msg">
-#   else<br class="m_4779842885532831843gmail_msg">
-#       warning exception_ptr not yet implemented<br class="m_4779842885532831843gmail_msg">
-#   endif<br class="m_4779842885532831843gmail_msg">
-    fprintf(stderr, "exception_ptr not yet implemented\n");<br class="m_4779842885532831843gmail_msg">
-    ::abort();<br class="m_4779842885532831843gmail_msg">
-#endif<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-#if HAVE_DEPENDENT_EH_ABI<br class="m_4779842885532831843gmail_msg">
-    if (__ptr_ != other.__ptr_)<br class="m_4779842885532831843gmail_msg">
-    {<br class="m_4779842885532831843gmail_msg">
-        __cxa_increment_exception_<wbr>refcount(other.__ptr_);<br class="m_4779842885532831843gmail_msg">
-        __cxa_decrement_exception_<wbr>refcount(__ptr_);<br class="m_4779842885532831843gmail_msg">
-        __ptr_ = other.__ptr_;<br class="m_4779842885532831843gmail_msg">
-    }<br class="m_4779842885532831843gmail_msg">
-    return *this;<br class="m_4779842885532831843gmail_msg">
-#elif defined(__GLIBCXX__)<br class="m_4779842885532831843gmail_msg">
-    *reinterpret_cast<__exception_<wbr>ptr::exception_ptr*>(this) =<br class="m_4779842885532831843gmail_msg">
-        reinterpret_cast<const __exception_ptr::exception_<wbr>ptr&>(other);<br class="m_4779842885532831843gmail_msg">
-    return *this;<br class="m_4779842885532831843gmail_msg">
-#else<br class="m_4779842885532831843gmail_msg">
-#   if defined(_LIBCPP_MSVC)<br class="m_4779842885532831843gmail_msg">
-        _LIBCPP_WARNING("exception_ptr not yet implemented")<br class="m_4779842885532831843gmail_msg">
-#   else<br class="m_4779842885532831843gmail_msg">
-#       warning exception_ptr not yet implemented<br class="m_4779842885532831843gmail_msg">
-#   endif<br class="m_4779842885532831843gmail_msg">
-    fprintf(stderr, "exception_ptr not yet implemented\n");<br class="m_4779842885532831843gmail_msg">
-    ::abort();<br class="m_4779842885532831843gmail_msg">
-#endif<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-nested_exception::nested_<wbr>exception() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-    : __ptr_(current_exception())<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#if !defined(__GLIBCXX__)<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-nested_exception::~nested_<wbr>exception() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#endif<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-_LIBCPP_NORETURN<br class="m_4779842885532831843gmail_msg">
-void<br class="m_4779842885532831843gmail_msg">
-nested_exception::rethrow_<wbr>nested() const<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-    if (__ptr_ == nullptr)<br class="m_4779842885532831843gmail_msg">
-        terminate();<br class="m_4779842885532831843gmail_msg">
-    rethrow_exception(__ptr_);<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#if !defined(__GLIBCXX__)<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-exception_ptr current_exception() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-#if HAVE_DEPENDENT_EH_ABI<br class="m_4779842885532831843gmail_msg">
-    // be nicer if there was a constructor that took a ptr, then<br class="m_4779842885532831843gmail_msg">
-    // this whole function would be just:<br class="m_4779842885532831843gmail_msg">
-    //    return exception_ptr(__cxa_current_<wbr>primary_exception());<br class="m_4779842885532831843gmail_msg">
-    exception_ptr ptr;<br class="m_4779842885532831843gmail_msg">
-    ptr.__ptr_ = __cxa_current_primary_<wbr>exception();<br class="m_4779842885532831843gmail_msg">
-    return ptr;<br class="m_4779842885532831843gmail_msg">
-#else<br class="m_4779842885532831843gmail_msg">
-#   if defined(_LIBCPP_MSVC)<br class="m_4779842885532831843gmail_msg">
-        _LIBCPP_WARNING( "exception_ptr not yet implemented" )<br class="m_4779842885532831843gmail_msg">
-#   else<br class="m_4779842885532831843gmail_msg">
-#       warning exception_ptr not yet implemented<br class="m_4779842885532831843gmail_msg">
-#   endif<br class="m_4779842885532831843gmail_msg">
-    fprintf(stderr, "exception_ptr not yet implemented\n");<br class="m_4779842885532831843gmail_msg">
-    ::abort();<br class="m_4779842885532831843gmail_msg">
-#endif<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#endif  // !__GLIBCXX__<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-_LIBCPP_NORETURN<br class="m_4779842885532831843gmail_msg">
-void rethrow_exception(exception_<wbr>ptr p)<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-#if HAVE_DEPENDENT_EH_ABI<br class="m_4779842885532831843gmail_msg">
-    __cxa_rethrow_primary_<wbr>exception(p.__ptr_);<br class="m_4779842885532831843gmail_msg">
-    // if p.__ptr_ is NULL, above returns so we terminate<br class="m_4779842885532831843gmail_msg">
-    terminate();<br class="m_4779842885532831843gmail_msg">
+#include "support/runtime/exception_<wbr>msvc.ipp"<br class="m_4779842885532831843gmail_msg">
+#include "support/runtime/exception_<wbr>pointer_unimplemented.ipp"<br class="m_4779842885532831843gmail_msg">
+#elif defined(_LIBCPPABI_VERSION)<br class="m_4779842885532831843gmail_msg">
+#include "support/runtime/exception_<wbr>libcxxabi.ipp"<br class="m_4779842885532831843gmail_msg">
+#include "support/runtime/exception_<wbr>pointer_cxxabi.ipp"<br class="m_4779842885532831843gmail_msg">
+#elif defined(LIBCXXRT)<br class="m_4779842885532831843gmail_msg">
+#include "support/runtime/exception_<wbr>libcxxrt.ipp"<br class="m_4779842885532831843gmail_msg">
+#include "support/runtime/exception_<wbr>pointer_cxxabi.ipp"<br class="m_4779842885532831843gmail_msg">
 #elif defined(__GLIBCXX__)<br class="m_4779842885532831843gmail_msg">
-    rethrow_exception(reinterpret_<wbr>cast<__exception_ptr::<wbr>exception_ptr&>(p));<br class="m_4779842885532831843gmail_msg">
+#include "support/runtime/exception_<wbr>glibcxx.ipp"<br class="m_4779842885532831843gmail_msg">
+#include "support/runtime/exception_<wbr>pointer_glibcxx.ipp"<br class="m_4779842885532831843gmail_msg">
 #else<br class="m_4779842885532831843gmail_msg">
-#   if defined(_LIBCPP_MSVC)<br class="m_4779842885532831843gmail_msg">
-        _LIBCPP_WARNING("exception_ptr not yet implemented")<br class="m_4779842885532831843gmail_msg">
-#   else<br class="m_4779842885532831843gmail_msg">
-#       warning exception_ptr not yet implemented<br class="m_4779842885532831843gmail_msg">
-#   endif<br class="m_4779842885532831843gmail_msg">
-    fprintf(stderr, "exception_ptr not yet implemented\n");<br class="m_4779842885532831843gmail_msg">
-    ::abort();<br class="m_4779842885532831843gmail_msg">
+#include "support/runtime/exception_<wbr>fallback.ipp"<br class="m_4779842885532831843gmail_msg">
+#include "support/runtime/exception_<wbr>pointer_unimplemented.ipp"<br class="m_4779842885532831843gmail_msg">
 #endif<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-} // std<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
Modified: libcxx/trunk/src/new.cpp<br class="m_4779842885532831843gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/new.cpp?rev=294707&r1=294706&r2=294707&view=diff" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/src/new.<wbr>cpp?rev=294707&r1=294706&r2=<wbr>294707&view=diff</a><br class="m_4779842885532831843gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_4779842885532831843gmail_msg">
--- libcxx/trunk/src/new.cpp (original)<br class="m_4779842885532831843gmail_msg">
+++ libcxx/trunk/src/new.cpp Thu Feb  9 22:25:33 2017<br class="m_4779842885532831843gmail_msg">
@@ -13,27 +13,45 @@<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
 #include "new"<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
-#if defined(__APPLE__) && !defined(LIBCXXRT) && \<br class="m_4779842885532831843gmail_msg">
-    !defined(_LIBCPP_BUILDING_HAS_<wbr>NO_ABI_LIBRARY)<br class="m_4779842885532831843gmail_msg">
-    #include <cxxabi.h><br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-    #ifndef _LIBCPPABI_VERSION<br class="m_4779842885532831843gmail_msg">
-        // On Darwin, there are two STL shared libraries and a lower level ABI<br class="m_4779842885532831843gmail_msg">
-        // shared library.  The global holding the current new handler is<br class="m_4779842885532831843gmail_msg">
-        // in the ABI library and named __cxa_new_handler.<br class="m_4779842885532831843gmail_msg">
-        #define __new_handler __cxxabiapple::__cxa_new_<wbr>handler<br class="m_4779842885532831843gmail_msg">
-    #endif<br class="m_4779842885532831843gmail_msg">
-#else  // __APPLE__<br class="m_4779842885532831843gmail_msg">
-    #if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_<wbr>LIBCXXABI)<br class="m_4779842885532831843gmail_msg">
-        #include <cxxabi.h><br class="m_4779842885532831843gmail_msg">
-    #endif  // defined(LIBCXX_BUILDING_<wbr>LIBCXXABI)<br class="m_4779842885532831843gmail_msg">
-    #if defined(_LIBCPP_BUILDING_HAS_<wbr>NO_ABI_LIBRARY) || \<br class="m_4779842885532831843gmail_msg">
-        (!defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__))<br class="m_4779842885532831843gmail_msg">
-        static std::new_handler __new_handler;<br class="m_4779842885532831843gmail_msg">
-    #endif  // _LIBCPPABI_VERSION<br class="m_4779842885532831843gmail_msg">
+#if defined(_LIBCPP_ABI_MICROSOFT)<br class="m_4779842885532831843gmail_msg">
+// nothing todo<br class="m_4779842885532831843gmail_msg">
+#elif defined(LIBCXX_BUILDING_<wbr>LIBCXXABI)<br class="m_4779842885532831843gmail_msg">
+#include <cxxabi.h><br class="m_4779842885532831843gmail_msg">
+#elif defined(LIBCXXRT)<br class="m_4779842885532831843gmail_msg">
+#include <cxxabi.h><br class="m_4779842885532831843gmail_msg">
+#include "new_handler_fallback.ipp"<br class="m_4779842885532831843gmail_msg">
+#elif defined(__GLIBCXX__)<br class="m_4779842885532831843gmail_msg">
+// nothing todo<br class="m_4779842885532831843gmail_msg">
+#elif defined(_LIBCPP_BUILDING_NO_<wbr>ABI_LIBRARY)<br class="m_4779842885532831843gmail_msg">
+// nothing todo<br class="m_4779842885532831843gmail_msg">
+#else<br class="m_4779842885532831843gmail_msg">
+#error UNSUPPORTED configuration<br class="m_4779842885532831843gmail_msg">
 #endif<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
+namespace std<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
 #ifndef __GLIBCXX__<br class="m_4779842885532831843gmail_msg">
+const nothrow_t nothrow = {};<br class="m_4779842885532831843gmail_msg">
+#endif<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+#ifndef LIBSTDCXX<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+void<br class="m_4779842885532831843gmail_msg">
+__throw_bad_alloc()<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+#ifndef _LIBCPP_NO_EXCEPTIONS<br class="m_4779842885532831843gmail_msg">
+    throw bad_alloc();<br class="m_4779842885532831843gmail_msg">
+#else<br class="m_4779842885532831843gmail_msg">
+    _VSTD::abort();<br class="m_4779842885532831843gmail_msg">
+#endif<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+#endif // !LIBSTDCXX<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+}  // std<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+#if !defined(__GLIBCXX__) && !defined(_LIBCPP_ABI_<wbr>MICROSOFT)<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
 // Implement all new and delete operators as weak definitions<br class="m_4779842885532831843gmail_msg">
 // in this shared library, so that they can be overridden by programs<br class="m_4779842885532831843gmail_msg">
@@ -277,107 +295,5 @@ operator delete[] (void* ptr, size_t, st<br class="m_4779842885532831843gmail_msg">
     ::operator delete[](ptr, alignment);<br class="m_4779842885532831843gmail_msg">
 }<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
-#endif // !defined(_LIBCPP_HAS_NO_<wbr>ALIGNED_ALLOCATION)<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#endif // !__GLIBCXX__<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-namespace std<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#ifndef __GLIBCXX__<br class="m_4779842885532831843gmail_msg">
-const nothrow_t nothrow = {};<br class="m_4779842885532831843gmail_msg">
-#endif<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#ifndef _LIBCPPABI_VERSION<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#ifndef __GLIBCXX__<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-new_handler<br class="m_4779842885532831843gmail_msg">
-set_new_handler(new_handler handler) _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-    return __sync_lock_test_and_set(&__<wbr>new_handler, handler);<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-new_handler<br class="m_4779842885532831843gmail_msg">
-get_new_handler() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-    return __sync_fetch_and_add(&__new_<wbr>handler, nullptr);<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#endif // !__GLIBCXX__<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#ifndef LIBCXXRT<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-bad_alloc::bad_alloc() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#ifndef __GLIBCXX__<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-bad_alloc::~bad_alloc() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-const char*<br class="m_4779842885532831843gmail_msg">
-bad_alloc::what() const _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-    return "std::bad_alloc";<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#endif // !__GLIBCXX__<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-bad_array_new_length::bad_<wbr>array_new_length() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#ifndef __GLIBCXX__<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-bad_array_new_length::~bad_<wbr>array_new_length() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-const char*<br class="m_4779842885532831843gmail_msg">
-bad_array_new_length::what() const _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-    return "bad_array_new_length";<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#endif // !__GLIBCXX__<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#endif //LIBCXXRT<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-bad_array_length::bad_array_<wbr>length() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#ifndef __GLIBCXX__<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-bad_array_length::~bad_array_<wbr>length() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-const char*<br class="m_4779842885532831843gmail_msg">
-bad_array_length::what() const _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-    return "bad_array_length";<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#endif // !__GLIBCXX__<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#endif // _LIBCPPABI_VERSION<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#ifndef LIBSTDCXX<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-void<br class="m_4779842885532831843gmail_msg">
-__throw_bad_alloc()<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-#ifndef _LIBCPP_NO_EXCEPTIONS<br class="m_4779842885532831843gmail_msg">
-    throw bad_alloc();<br class="m_4779842885532831843gmail_msg">
-#else<br class="m_4779842885532831843gmail_msg">
-    _VSTD::abort();<br class="m_4779842885532831843gmail_msg">
-#endif<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#endif // !LIBSTDCXX<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-}  // std<br class="m_4779842885532831843gmail_msg">
+#endif // !_LIBCPP_HAS_NO_ALIGNED_<wbr>ALLOCATION<br class="m_4779842885532831843gmail_msg">
+#endif // !__GLIBCXX__ && !_LIBCPP_ABI_MICROSOFT<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
Added: libcxx/trunk/src/support/<wbr>runtime/exception_fallback.ipp<br class="m_4779842885532831843gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/support/runtime/exception_fallback.ipp?rev=294707&view=auto" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/src/<wbr>support/runtime/exception_<wbr>fallback.ipp?rev=294707&view=<wbr>auto</a><br class="m_4779842885532831843gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_4779842885532831843gmail_msg">
--- libcxx/trunk/src/support/<wbr>runtime/exception_fallback.ipp (added)<br class="m_4779842885532831843gmail_msg">
+++ libcxx/trunk/src/support/<wbr>runtime/exception_fallback.ipp Thu Feb  9 22:25:33 2017<br class="m_4779842885532831843gmail_msg">
@@ -0,0 +1,182 @@<br class="m_4779842885532831843gmail_msg">
+// -*- C++ -*-<br class="m_4779842885532831843gmail_msg">
+//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+//                     The LLVM Compiler Infrastructure<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+// This file is dual licensed under the MIT and the University of Illinois Open<br class="m_4779842885532831843gmail_msg">
+// Source Licenses. See LICENSE.TXT for details.<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+namespace std {<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+_LIBCPP_SAFE_STATIC static std::terminate_handler  __terminate_handler;<br class="m_4779842885532831843gmail_msg">
+_LIBCPP_SAFE_STATIC static std::unexpected_handler __unexpected_handler;<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+// libcxxrt provides implementations of these functions itself.<br class="m_4779842885532831843gmail_msg">
+unexpected_handler<br class="m_4779842885532831843gmail_msg">
+set_unexpected(unexpected_<wbr>handler func) _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+  return __sync_lock_test_and_set(&__<wbr>unexpected_handler, func);<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+unexpected_handler<br class="m_4779842885532831843gmail_msg">
+get_unexpected() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+  return __sync_fetch_and_add(&__<wbr>unexpected_handler, (unexpected_handler)0);<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+_LIBCPP_NORETURN<br class="m_4779842885532831843gmail_msg">
+void unexpected()<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    (*get_unexpected())();<br class="m_4779842885532831843gmail_msg">
+    // unexpected handler should not return<br class="m_4779842885532831843gmail_msg">
+    terminate();<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+terminate_handler<br class="m_4779842885532831843gmail_msg">
+set_terminate(terminate_<wbr>handler func) _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+  return __sync_lock_test_and_set(&__<wbr>terminate_handler, func);<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+terminate_handler<br class="m_4779842885532831843gmail_msg">
+get_terminate() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+  return __sync_fetch_and_add(&__<wbr>terminate_handler, (terminate_handler)0);<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+#ifndef __EMSCRIPTEN__ // We provide this in JS<br class="m_4779842885532831843gmail_msg">
+_LIBCPP_NORETURN<br class="m_4779842885532831843gmail_msg">
+void<br class="m_4779842885532831843gmail_msg">
+terminate() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+#ifndef _LIBCPP_NO_EXCEPTIONS<br class="m_4779842885532831843gmail_msg">
+    try<br class="m_4779842885532831843gmail_msg">
+    {<br class="m_4779842885532831843gmail_msg">
+#endif  // _LIBCPP_NO_EXCEPTIONS<br class="m_4779842885532831843gmail_msg">
+        (*get_terminate())();<br class="m_4779842885532831843gmail_msg">
+        // handler should not return<br class="m_4779842885532831843gmail_msg">
+        fprintf(stderr, "terminate_handler unexpectedly returned\n");<br class="m_4779842885532831843gmail_msg">
+        ::abort();<br class="m_4779842885532831843gmail_msg">
+#ifndef _LIBCPP_NO_EXCEPTIONS<br class="m_4779842885532831843gmail_msg">
+    }<br class="m_4779842885532831843gmail_msg">
+    catch (...)<br class="m_4779842885532831843gmail_msg">
+    {<br class="m_4779842885532831843gmail_msg">
+        // handler should not throw exception<br class="m_4779842885532831843gmail_msg">
+        fprintf(stderr, "terminate_handler unexpectedly threw an exception\n");<br class="m_4779842885532831843gmail_msg">
+        ::abort();<br class="m_4779842885532831843gmail_msg">
+    }<br class="m_4779842885532831843gmail_msg">
+#endif  // _LIBCPP_NO_EXCEPTIONS<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+#endif // !__EMSCRIPTEN__<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+#if !defined(__EMSCRIPTEN__)<br class="m_4779842885532831843gmail_msg">
+bool uncaught_exception() _NOEXCEPT { return uncaught_exceptions() > 0; }<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+int uncaught_exceptions() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+#warning uncaught_exception not yet implemented<br class="m_4779842885532831843gmail_msg">
+  fprintf(stderr, "uncaught_exceptions not yet implemented\n");<br class="m_4779842885532831843gmail_msg">
+  ::abort();<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+#endif // !__EMSCRIPTEN__<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+exception::~exception() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+const char* exception::what() const _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+  return "std::exception";<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_exception::~bad_<wbr>exception() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+const char* bad_exception::what() const _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+  return "std::bad_exception";<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_alloc::bad_alloc() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_alloc::~bad_alloc() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+const char*<br class="m_4779842885532831843gmail_msg">
+bad_alloc::what() const _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    return "std::bad_alloc";<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_array_new_length::bad_<wbr>array_new_length() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_array_new_length::~bad_<wbr>array_new_length() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+const char*<br class="m_4779842885532831843gmail_msg">
+bad_array_new_length::what() const _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    return "bad_array_new_length";<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_array_length::bad_array_<wbr>length() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_array_length::~bad_array_<wbr>length() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+const char*<br class="m_4779842885532831843gmail_msg">
+bad_array_length::what() const _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    return "bad_array_length";<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_cast::bad_cast() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_typeid::bad_typeid() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+#ifndef __GLIBCXX__<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_cast::~bad_cast() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+const char*<br class="m_4779842885532831843gmail_msg">
+bad_cast::what() const _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+  return "std::bad_cast";<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_typeid::~bad_typeid() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+const char*<br class="m_4779842885532831843gmail_msg">
+bad_typeid::what() const _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+  return "std::bad_typeid";<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+} // namespace std<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
Added: libcxx/trunk/src/support/<wbr>runtime/exception_glibcxx.ipp<br class="m_4779842885532831843gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/support/runtime/exception_glibcxx.ipp?rev=294707&view=auto" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/src/<wbr>support/runtime/exception_<wbr>glibcxx.ipp?rev=294707&view=<wbr>auto</a><br class="m_4779842885532831843gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_4779842885532831843gmail_msg">
--- libcxx/trunk/src/support/<wbr>runtime/exception_glibcxx.ipp (added)<br class="m_4779842885532831843gmail_msg">
+++ libcxx/trunk/src/support/<wbr>runtime/exception_glibcxx.ipp Thu Feb  9 22:25:33 2017<br class="m_4779842885532831843gmail_msg">
@@ -0,0 +1,38 @@<br class="m_4779842885532831843gmail_msg">
+// -*- C++ -*-<br class="m_4779842885532831843gmail_msg">
+//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+//                     The LLVM Compiler Infrastructure<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+// This file is dual licensed under the MIT and the University of Illinois Open<br class="m_4779842885532831843gmail_msg">
+// Source Licenses. See LICENSE.TXT for details.<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+#ifndef __GLIBCXX__<br class="m_4779842885532831843gmail_msg">
+#error header can only be used when targeting libstdc++ or libsupc++<br class="m_4779842885532831843gmail_msg">
+#endif<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+namespace std {<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_alloc::bad_alloc() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_array_new_length::bad_<wbr>array_new_length() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_array_length::bad_array_<wbr>length() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_cast::bad_cast() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_typeid::bad_typeid() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+} // namespace<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
Added: libcxx/trunk/src/support/<wbr>runtime/exception_libcxxabi.<wbr>ipp<br class="m_4779842885532831843gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/support/runtime/exception_libcxxabi.ipp?rev=294707&view=auto" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/src/<wbr>support/runtime/exception_<wbr>libcxxabi.ipp?rev=294707&view=<wbr>auto</a><br class="m_4779842885532831843gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_4779842885532831843gmail_msg">
--- libcxx/trunk/src/support/<wbr>runtime/exception_libcxxabi.<wbr>ipp (added)<br class="m_4779842885532831843gmail_msg">
+++ libcxx/trunk/src/support/<wbr>runtime/exception_libcxxabi.<wbr>ipp Thu Feb  9 22:25:33 2017<br class="m_4779842885532831843gmail_msg">
@@ -0,0 +1,28 @@<br class="m_4779842885532831843gmail_msg">
+// -*- C++ -*-<br class="m_4779842885532831843gmail_msg">
+//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+//                     The LLVM Compiler Infrastructure<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+// This file is dual licensed under the MIT and the University of Illinois Open<br class="m_4779842885532831843gmail_msg">
+// Source Licenses. See LICENSE.TXT for details.<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+#ifndef _LIBCPPABI_VERSION<br class="m_4779842885532831843gmail_msg">
+#error this header can only be used with libc++abi<br class="m_4779842885532831843gmail_msg">
+#endif<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+namespace std {<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bool uncaught_exception() _NOEXCEPT { return uncaught_exceptions() > 0; }<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+int uncaught_exceptions() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+# if _LIBCPPABI_VERSION > 1101<br class="m_4779842885532831843gmail_msg">
+    return __cxa_uncaught_exceptions();<br class="m_4779842885532831843gmail_msg">
+# else<br class="m_4779842885532831843gmail_msg">
+    return __cxa_uncaught_exception() ? 1 : 0;<br class="m_4779842885532831843gmail_msg">
+# endif<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+} // namespace std<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
Added: libcxx/trunk/src/support/<wbr>runtime/exception_libcxxrt.ipp<br class="m_4779842885532831843gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/support/runtime/exception_libcxxrt.ipp?rev=294707&view=auto" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/src/<wbr>support/runtime/exception_<wbr>libcxxrt.ipp?rev=294707&view=<wbr>auto</a><br class="m_4779842885532831843gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_4779842885532831843gmail_msg">
--- libcxx/trunk/src/support/<wbr>runtime/exception_libcxxrt.ipp (added)<br class="m_4779842885532831843gmail_msg">
+++ libcxx/trunk/src/support/<wbr>runtime/exception_libcxxrt.ipp Thu Feb  9 22:25:33 2017<br class="m_4779842885532831843gmail_msg">
@@ -0,0 +1,41 @@<br class="m_4779842885532831843gmail_msg">
+// -*- C++ -*-<br class="m_4779842885532831843gmail_msg">
+//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+//                     The LLVM Compiler Infrastructure<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+// This file is dual licensed under the MIT and the University of Illinois Open<br class="m_4779842885532831843gmail_msg">
+// Source Licenses. See LICENSE.TXT for details.<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+#ifndef LIBCXXRT<br class="m_4779842885532831843gmail_msg">
+#error this header may only be used when targeting libcxxrt<br class="m_4779842885532831843gmail_msg">
+#endif<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+namespace std {<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_exception::~bad_<wbr>exception() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+const char* bad_exception::what() const _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+  return "std::bad_exception";<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_array_length::bad_array_<wbr>length() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_array_length::~bad_array_<wbr>length() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+const char*<br class="m_4779842885532831843gmail_msg">
+bad_array_length::what() const _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    return "bad_array_length";<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+} // namespace std<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
Added: libcxx/trunk/src/support/<wbr>runtime/exception_msvc.ipp<br class="m_4779842885532831843gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/support/runtime/exception_msvc.ipp?rev=294707&view=auto" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/src/<wbr>support/runtime/exception_<wbr>msvc.ipp?rev=294707&view=auto</a><br class="m_4779842885532831843gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_4779842885532831843gmail_msg">
--- libcxx/trunk/src/support/<wbr>runtime/exception_msvc.ipp (added)<br class="m_4779842885532831843gmail_msg">
+++ libcxx/trunk/src/support/<wbr>runtime/exception_msvc.ipp Thu Feb  9 22:25:33 2017<br class="m_4779842885532831843gmail_msg">
@@ -0,0 +1,89 @@<br class="m_4779842885532831843gmail_msg">
+// -*- C++ -*-<br class="m_4779842885532831843gmail_msg">
+//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+//                     The LLVM Compiler Infrastructure<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+// This file is dual licensed under the MIT and the University of Illinois Open<br class="m_4779842885532831843gmail_msg">
+// Source Licenses. See LICENSE.TXT for details.<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+#ifndef _LIBCPP_ABI_MICROSOFT<br class="m_4779842885532831843gmail_msg">
+#error this header can only be used when targeting the MSVC ABI<br class="m_4779842885532831843gmail_msg">
+#endif<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+#include <stdio.h><br class="m_4779842885532831843gmail_msg">
+#include <stdlib.h><br class="m_4779842885532831843gmail_msg">
+#include <eh.h><br class="m_4779842885532831843gmail_msg">
+#include <corecrt_terminate.h><br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+namespace std {<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+// libcxxrt provides implementations of these functions itself.<br class="m_4779842885532831843gmail_msg">
+unexpected_handler<br class="m_4779842885532831843gmail_msg">
+set_unexpected(unexpected_<wbr>handler func) _NOEXCEPT {<br class="m_4779842885532831843gmail_msg">
+  return ::set_unexpected(func);<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+unexpected_handler get_unexpected() _NOEXCEPT {<br class="m_4779842885532831843gmail_msg">
+  return ::_get_unexpected();<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+_LIBCPP_NORETURN<br class="m_4779842885532831843gmail_msg">
+void unexpected() {<br class="m_4779842885532831843gmail_msg">
+    (*get_unexpected())();<br class="m_4779842885532831843gmail_msg">
+    // unexpected handler should not return<br class="m_4779842885532831843gmail_msg">
+    terminate();<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+terminate_handler set_terminate(terminate_<wbr>handler func) _NOEXCEPT {<br class="m_4779842885532831843gmail_msg">
+  return ::set_terminate(func);<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+terminate_handler get_terminate() _NOEXCEPT {<br class="m_4779842885532831843gmail_msg">
+  return ::_get_terminate();<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+_LIBCPP_NORETURN<br class="m_4779842885532831843gmail_msg">
+void terminate() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+#ifndef _LIBCPP_NO_EXCEPTIONS<br class="m_4779842885532831843gmail_msg">
+    try<br class="m_4779842885532831843gmail_msg">
+    {<br class="m_4779842885532831843gmail_msg">
+#endif  // _LIBCPP_NO_EXCEPTIONS<br class="m_4779842885532831843gmail_msg">
+        (*get_terminate())();<br class="m_4779842885532831843gmail_msg">
+        // handler should not return<br class="m_4779842885532831843gmail_msg">
+        fprintf(stderr, "terminate_handler unexpectedly returned\n");<br class="m_4779842885532831843gmail_msg">
+        ::abort();<br class="m_4779842885532831843gmail_msg">
+#ifndef _LIBCPP_NO_EXCEPTIONS<br class="m_4779842885532831843gmail_msg">
+    }<br class="m_4779842885532831843gmail_msg">
+    catch (...)<br class="m_4779842885532831843gmail_msg">
+    {<br class="m_4779842885532831843gmail_msg">
+        // handler should not throw exception<br class="m_4779842885532831843gmail_msg">
+        fprintf(stderr, "terminate_handler unexpectedly threw an exception\n");<br class="m_4779842885532831843gmail_msg">
+        ::abort();<br class="m_4779842885532831843gmail_msg">
+    }<br class="m_4779842885532831843gmail_msg">
+#endif  // _LIBCPP_NO_EXCEPTIONS<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bool uncaught_exception() _NOEXCEPT { return uncaught_exceptions() > 0; }<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+int uncaught_exceptions() _NOEXCEPT {<br class="m_4779842885532831843gmail_msg">
+    return __uncaught_exceptions();<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_array_length::bad_array_<wbr>length() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+bad_array_length::~bad_array_<wbr>length() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+const char*<br class="m_4779842885532831843gmail_msg">
+bad_array_length::what() const _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    return "bad_array_length";<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+} // namespace std<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
Added: libcxx/trunk/src/support/<wbr>runtime/exception_pointer_<wbr>cxxabi.ipp<br class="m_4779842885532831843gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/support/runtime/exception_pointer_cxxabi.ipp?rev=294707&view=auto" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/src/<wbr>support/runtime/exception_<wbr>pointer_cxxabi.ipp?rev=294707&<wbr>view=auto</a><br class="m_4779842885532831843gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_4779842885532831843gmail_msg">
--- libcxx/trunk/src/support/<wbr>runtime/exception_pointer_<wbr>cxxabi.ipp (added)<br class="m_4779842885532831843gmail_msg">
+++ libcxx/trunk/src/support/<wbr>runtime/exception_pointer_<wbr>cxxabi.ipp Thu Feb  9 22:25:33 2017<br class="m_4779842885532831843gmail_msg">
@@ -0,0 +1,74 @@<br class="m_4779842885532831843gmail_msg">
+// -*- C++ -*-<br class="m_4779842885532831843gmail_msg">
+//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+//                     The LLVM Compiler Infrastructure<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+// This file is dual licensed under the MIT and the University of Illinois Open<br class="m_4779842885532831843gmail_msg">
+// Source Licenses. See LICENSE.TXT for details.<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+#ifndef HAVE_DEPENDENT_EH_ABI<br class="m_4779842885532831843gmail_msg">
+#error this header may only be used with libc++abi or libcxxrt<br class="m_4779842885532831843gmail_msg">
+#endif<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+namespace std {<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+exception_ptr::~exception_<wbr>ptr() _NOEXCEPT {<br class="m_4779842885532831843gmail_msg">
+  __cxa_decrement_exception_<wbr>refcount(__ptr_);<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+exception_ptr::exception_ptr(<wbr>const exception_ptr& other) _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+    : __ptr_(other.__ptr_)<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    __cxa_increment_exception_<wbr>refcount(__ptr_);<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    if (__ptr_ != other.__ptr_)<br class="m_4779842885532831843gmail_msg">
+    {<br class="m_4779842885532831843gmail_msg">
+        __cxa_increment_exception_<wbr>refcount(other.__ptr_);<br class="m_4779842885532831843gmail_msg">
+        __cxa_decrement_exception_<wbr>refcount(__ptr_);<br class="m_4779842885532831843gmail_msg">
+        __ptr_ = other.__ptr_;<br class="m_4779842885532831843gmail_msg">
+    }<br class="m_4779842885532831843gmail_msg">
+    return *this;<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+nested_exception::nested_<wbr>exception() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+    : __ptr_(current_exception())<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+nested_exception::~nested_<wbr>exception() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+_LIBCPP_NORETURN<br class="m_4779842885532831843gmail_msg">
+void<br class="m_4779842885532831843gmail_msg">
+nested_exception::rethrow_<wbr>nested() const<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    if (__ptr_ == nullptr)<br class="m_4779842885532831843gmail_msg">
+        terminate();<br class="m_4779842885532831843gmail_msg">
+    rethrow_exception(__ptr_);<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+exception_ptr current_exception() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    // be nicer if there was a constructor that took a ptr, then<br class="m_4779842885532831843gmail_msg">
+    // this whole function would be just:<br class="m_4779842885532831843gmail_msg">
+    //    return exception_ptr(__cxa_current_<wbr>primary_exception());<br class="m_4779842885532831843gmail_msg">
+    exception_ptr ptr;<br class="m_4779842885532831843gmail_msg">
+    ptr.__ptr_ = __cxa_current_primary_<wbr>exception();<br class="m_4779842885532831843gmail_msg">
+    return ptr;<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+_LIBCPP_NORETURN<br class="m_4779842885532831843gmail_msg">
+void rethrow_exception(exception_<wbr>ptr p)<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    __cxa_rethrow_primary_<wbr>exception(p.__ptr_);<br class="m_4779842885532831843gmail_msg">
+    // if p.__ptr_ is NULL, above returns so we terminate<br class="m_4779842885532831843gmail_msg">
+    terminate();<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+} // namespace std<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
Added: libcxx/trunk/src/support/<wbr>runtime/exception_pointer_<wbr>glibcxx.ipp<br class="m_4779842885532831843gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/support/runtime/exception_pointer_glibcxx.ipp?rev=294707&view=auto" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/src/<wbr>support/runtime/exception_<wbr>pointer_glibcxx.ipp?rev=<wbr>294707&view=auto</a><br class="m_4779842885532831843gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_4779842885532831843gmail_msg">
--- libcxx/trunk/src/support/<wbr>runtime/exception_pointer_<wbr>glibcxx.ipp (added)<br class="m_4779842885532831843gmail_msg">
+++ libcxx/trunk/src/support/<wbr>runtime/exception_pointer_<wbr>glibcxx.ipp Thu Feb  9 22:25:33 2017<br class="m_4779842885532831843gmail_msg">
@@ -0,0 +1,74 @@<br class="m_4779842885532831843gmail_msg">
+// -*- C++ -*-<br class="m_4779842885532831843gmail_msg">
+//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+//                     The LLVM Compiler Infrastructure<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+// This file is dual licensed under the MIT and the University of Illinois Open<br class="m_4779842885532831843gmail_msg">
+// Source Licenses. See LICENSE.TXT for details.<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+// libsupc++ does not implement the dependent EH ABI and the functionality<br class="m_4779842885532831843gmail_msg">
+// it uses to implement std::exception_ptr (which it declares as an alias of<br class="m_4779842885532831843gmail_msg">
+// std::__exception_ptr::<wbr>exception_ptr) is not directly exported to clients. So<br class="m_4779842885532831843gmail_msg">
+// we have little choice but to hijack std::__exception_ptr::<wbr>exception_ptr's<br class="m_4779842885532831843gmail_msg">
+// (which fortunately has the same layout as our std::exception_ptr) copy<br class="m_4779842885532831843gmail_msg">
+// constructor, assignment operator and destructor (which are part of its<br class="m_4779842885532831843gmail_msg">
+// stable ABI), and its rethrow_exception(std::__<wbr>exception_ptr::exception_ptr)<br class="m_4779842885532831843gmail_msg">
+// function.<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+namespace __exception_ptr<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+struct exception_ptr<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    void* __ptr_;<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+    exception_ptr(const exception_ptr&) _NOEXCEPT;<br class="m_4779842885532831843gmail_msg">
+    exception_ptr& operator=(const exception_ptr&) _NOEXCEPT;<br class="m_4779842885532831843gmail_msg">
+    ~exception_ptr() _NOEXCEPT;<br class="m_4779842885532831843gmail_msg">
+};<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+_LIBCPP_NORETURN void rethrow_exception(__exception_<wbr>ptr::exception_ptr);<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+exception_ptr::~exception_<wbr>ptr() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    reinterpret_cast<__exception_<wbr>ptr::exception_ptr*>(this)->~<wbr>exception_ptr();<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+exception_ptr::exception_ptr(<wbr>const exception_ptr& other) _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+    : __ptr_(other.__ptr_)<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    new (reinterpret_cast<void*>(this)<wbr>) __exception_ptr::exception_<wbr>ptr(<br class="m_4779842885532831843gmail_msg">
+        reinterpret_cast<const __exception_ptr::exception_<wbr>ptr&>(other));<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    *reinterpret_cast<__exception_<wbr>ptr::exception_ptr*>(this) =<br class="m_4779842885532831843gmail_msg">
+        reinterpret_cast<const __exception_ptr::exception_<wbr>ptr&>(other);<br class="m_4779842885532831843gmail_msg">
+    return *this;<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+nested_exception::nested_<wbr>exception() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+    : __ptr_(current_exception())<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+_LIBCPP_NORETURN<br class="m_4779842885532831843gmail_msg">
+void<br class="m_4779842885532831843gmail_msg">
+nested_exception::rethrow_<wbr>nested() const<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    if (__ptr_ == nullptr)<br class="m_4779842885532831843gmail_msg">
+        terminate();<br class="m_4779842885532831843gmail_msg">
+    rethrow_exception(__ptr_);<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+_LIBCPP_NORETURN<br class="m_4779842885532831843gmail_msg">
+void rethrow_exception(exception_<wbr>ptr p)<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    rethrow_exception(reinterpret_<wbr>cast<__exception_ptr::<wbr>exception_ptr&>(p));<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
Added: libcxx/trunk/src/support/<wbr>runtime/exception_pointer_<wbr>unimplemented.ipp<br class="m_4779842885532831843gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/support/runtime/exception_pointer_unimplemented.ipp?rev=294707&view=auto" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/src/<wbr>support/runtime/exception_<wbr>pointer_unimplemented.ipp?rev=<wbr>294707&view=auto</a><br class="m_4779842885532831843gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_4779842885532831843gmail_msg">
--- libcxx/trunk/src/support/<wbr>runtime/exception_pointer_<wbr>unimplemented.ipp (added)<br class="m_4779842885532831843gmail_msg">
+++ libcxx/trunk/src/support/<wbr>runtime/exception_pointer_<wbr>unimplemented.ipp Thu Feb  9 22:25:33 2017<br class="m_4779842885532831843gmail_msg">
@@ -0,0 +1,80 @@<br class="m_4779842885532831843gmail_msg">
+// -*- C++ -*-<br class="m_4779842885532831843gmail_msg">
+//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+//                     The LLVM Compiler Infrastructure<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+// This file is dual licensed under the MIT and the University of Illinois Open<br class="m_4779842885532831843gmail_msg">
+// Source Licenses. See LICENSE.TXT for details.<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+#include <stdio.h><br class="m_4779842885532831843gmail_msg">
+#include <stdlib.h><br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+namespace std {<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+exception_ptr::~exception_<wbr>ptr() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+#  warning exception_ptr not yet implemented<br class="m_4779842885532831843gmail_msg">
+  fprintf(stderr, "exception_ptr not yet implemented\n");<br class="m_4779842885532831843gmail_msg">
+  ::abort();<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+exception_ptr::exception_ptr(<wbr>const exception_ptr& other) _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+    : __ptr_(other.__ptr_)<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+#  warning exception_ptr not yet implemented<br class="m_4779842885532831843gmail_msg">
+  fprintf(stderr, "exception_ptr not yet implemented\n");<br class="m_4779842885532831843gmail_msg">
+  ::abort();<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+exception_ptr& exception_ptr::operator=(const exception_ptr& other) _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+#  warning exception_ptr not yet implemented<br class="m_4779842885532831843gmail_msg">
+  fprintf(stderr, "exception_ptr not yet implemented\n");<br class="m_4779842885532831843gmail_msg">
+  ::abort();<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+nested_exception::nested_<wbr>exception() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+    : __ptr_(current_exception())<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+#if !defined(__GLIBCXX__)<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+nested_exception::~nested_<wbr>exception() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+#endif<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+_LIBCPP_NORETURN<br class="m_4779842885532831843gmail_msg">
+void<br class="m_4779842885532831843gmail_msg">
+nested_exception::rethrow_<wbr>nested() const<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+#  warning exception_ptr not yet implemented<br class="m_4779842885532831843gmail_msg">
+  fprintf(stderr, "exception_ptr not yet implemented\n");<br class="m_4779842885532831843gmail_msg">
+  ::abort();<br class="m_4779842885532831843gmail_msg">
+#if 0<br class="m_4779842885532831843gmail_msg">
+  if (__ptr_ == nullptr)<br class="m_4779842885532831843gmail_msg">
+      terminate();<br class="m_4779842885532831843gmail_msg">
+  rethrow_exception(__ptr_);<br class="m_4779842885532831843gmail_msg">
+#endif // FIXME<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+exception_ptr current_exception() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+#  warning exception_ptr not yet implemented<br class="m_4779842885532831843gmail_msg">
+  fprintf(stderr, "exception_ptr not yet implemented\n");<br class="m_4779842885532831843gmail_msg">
+  ::abort();<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+_LIBCPP_NORETURN<br class="m_4779842885532831843gmail_msg">
+void rethrow_exception(exception_<wbr>ptr p)<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+#  warning exception_ptr not yet implemented<br class="m_4779842885532831843gmail_msg">
+  fprintf(stderr, "exception_ptr not yet implemented\n");<br class="m_4779842885532831843gmail_msg">
+  ::abort();<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+} // namespace std<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
Added: libcxx/trunk/src/support/<wbr>runtime/new_handler_fallback.<wbr>ipp<br class="m_4779842885532831843gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/support/runtime/new_handler_fallback.ipp?rev=294707&view=auto" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/src/<wbr>support/runtime/new_handler_<wbr>fallback.ipp?rev=294707&view=<wbr>auto</a><br class="m_4779842885532831843gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_4779842885532831843gmail_msg">
--- libcxx/trunk/src/support/<wbr>runtime/new_handler_fallback.<wbr>ipp (added)<br class="m_4779842885532831843gmail_msg">
+++ libcxx/trunk/src/support/<wbr>runtime/new_handler_fallback.<wbr>ipp Thu Feb  9 22:25:33 2017<br class="m_4779842885532831843gmail_msg">
@@ -0,0 +1,27 @@<br class="m_4779842885532831843gmail_msg">
+// -*- C++ -*-<br class="m_4779842885532831843gmail_msg">
+//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+//                     The LLVM Compiler Infrastructure<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+// This file is dual licensed under the MIT and the University of Illinois Open<br class="m_4779842885532831843gmail_msg">
+// Source Licenses. See LICENSE.TXT for details.<br class="m_4779842885532831843gmail_msg">
+//<br class="m_4779842885532831843gmail_msg">
+//===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+namespace std {<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+_LIBCPP_SAFE_STATIC static std::new_handler __new_handler;<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+new_handler<br class="m_4779842885532831843gmail_msg">
+set_new_handler(new_handler handler) _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    return __sync_lock_test_and_set(&__<wbr>new_handler, handler);<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+new_handler<br class="m_4779842885532831843gmail_msg">
+get_new_handler() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
+{<br class="m_4779842885532831843gmail_msg">
+    return __sync_fetch_and_add(&__new_<wbr>handler, nullptr);<br class="m_4779842885532831843gmail_msg">
+}<br class="m_4779842885532831843gmail_msg">
+<br class="m_4779842885532831843gmail_msg">
+} // namespace std<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
Modified: libcxx/trunk/src/typeinfo.cpp<br class="m_4779842885532831843gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/src/typeinfo.cpp?rev=294707&r1=294706&r2=294707&view=diff" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/src/<wbr>typeinfo.cpp?rev=294707&r1=<wbr>294706&r2=294707&view=diff</a><br class="m_4779842885532831843gmail_msg">
==============================<wbr>==============================<wbr>==================<br class="m_4779842885532831843gmail_msg">
--- libcxx/trunk/src/typeinfo.cpp (original)<br class="m_4779842885532831843gmail_msg">
+++ libcxx/trunk/src/typeinfo.cpp Thu Feb  9 22:25:33 2017<br class="m_4779842885532831843gmail_msg">
@@ -6,74 +6,11 @@<br class="m_4779842885532831843gmail_msg">
 // Source Licenses. See LICENSE.TXT for details.<br class="m_4779842885532831843gmail_msg">
 //<br class="m_4779842885532831843gmail_msg">
 //===------------------------<wbr>------------------------------<wbr>----------------===//<br class="m_4779842885532831843gmail_msg">
-#include <stdlib.h><br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#if !defined(_LIBCPP_BUILDING_HAS_<wbr>NO_ABI_LIBRARY) && \<br class="m_4779842885532831843gmail_msg">
-    (defined(__APPLE__) || defined(LIBCXXRT) || defined(LIBCXX_BUILDING_<wbr>LIBCXXABI))<br class="m_4779842885532831843gmail_msg">
-#include <cxxabi.h><br class="m_4779842885532831843gmail_msg">
-#endif<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
 #include "typeinfo"<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
-#if defined(_LIBCPP_BUILDING_HAS_<wbr>NO_ABI_LIBRARY) || \<br class="m_4779842885532831843gmail_msg">
-    defined(_LIBCPP_ABI_MICROSOFT) // FIXME: This is a temporary workaround<br class="m_4779842885532831843gmail_msg">
+#if defined(_LIBCPP_BUILDING_HAS_<wbr>NO_ABI_LIBRARY)<br class="m_4779842885532831843gmail_msg">
 std::type_info::~type_info()<br class="m_4779842885532831843gmail_msg">
 {<br class="m_4779842885532831843gmail_msg">
 }<br class="m_4779842885532831843gmail_msg">
 #endif<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#if !defined(LIBCXXRT) && !defined(_LIBCPPABI_VERSION)<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-std::bad_cast::bad_cast() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-std::bad_typeid::bad_typeid() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#ifndef __GLIBCXX__<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-std::bad_cast::~bad_cast() _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-const char*<br class="m_4779842885532831843gmail_msg">
-std::bad_cast::what() const _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-  return "std::bad_cast";<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-std::bad_typeid::~bad_typeid(<wbr>) _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-const char*<br class="m_4779842885532831843gmail_msg">
-std::bad_typeid::what() const _NOEXCEPT<br class="m_4779842885532831843gmail_msg">
-{<br class="m_4779842885532831843gmail_msg">
-  return "std::bad_typeid";<br class="m_4779842885532831843gmail_msg">
-}<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#if defined(__APPLE__) && !defined(_LIBCPP_BUILDING_HAS_<wbr>NO_ABI_LIBRARY)<br class="m_4779842885532831843gmail_msg">
-  // On Darwin, the cxa_bad_* functions cannot be in the lower level library<br class="m_4779842885532831843gmail_msg">
-  // because bad_cast and bad_typeid are defined in his higher level library<br class="m_4779842885532831843gmail_msg">
-  void __cxxabiv1::__cxa_bad_typeid()<br class="m_4779842885532831843gmail_msg">
-  {<br class="m_4779842885532831843gmail_msg">
-#ifndef _LIBCPP_NO_EXCEPTIONS<br class="m_4779842885532831843gmail_msg">
-     throw std::bad_typeid();<br class="m_4779842885532831843gmail_msg">
-#else<br class="m_4779842885532831843gmail_msg">
-     _VSTD::abort();<br class="m_4779842885532831843gmail_msg">
-#endif<br class="m_4779842885532831843gmail_msg">
-  }<br class="m_4779842885532831843gmail_msg">
-  void __cxxabiv1::__cxa_bad_cast()<br class="m_4779842885532831843gmail_msg">
-  {<br class="m_4779842885532831843gmail_msg">
-#ifndef _LIBCPP_NO_EXCEPTIONS<br class="m_4779842885532831843gmail_msg">
-      throw std::bad_cast();<br class="m_4779842885532831843gmail_msg">
-#else<br class="m_4779842885532831843gmail_msg">
-      _VSTD::abort();<br class="m_4779842885532831843gmail_msg">
-#endif<br class="m_4779842885532831843gmail_msg">
-  }<br class="m_4779842885532831843gmail_msg">
-#endif<br class="m_4779842885532831843gmail_msg">
-<br class="m_4779842885532831843gmail_msg">
-#endif  // !__GLIBCXX__<br class="m_4779842885532831843gmail_msg">
-#endif  // !LIBCXXRT && !_LIBCPPABI_VERSION<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
<br class="m_4779842885532831843gmail_msg">
______________________________<wbr>_________________<br class="m_4779842885532831843gmail_msg">
cfe-commits mailing list<br class="m_4779842885532831843gmail_msg">
<a href="mailto:cfe-commits@lists.llvm.org" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">cfe-commits@lists.llvm.org</a><br class="m_4779842885532831843gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" class="m_4779842885532831843gmail_msg m_4779842885532831843cremed" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br class="m_4779842885532831843gmail_msg">
</blockquote></div><br class="m_4779842885532831843gmail_msg"></div>
</blockquote></div></blockquote></div></div></div></div>
</blockquote></div><br></div>