[libcxxabi] r324542 - Fix compilation in C++17 mode.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 7 15:23:23 PST 2018
Author: rsmith
Date: Wed Feb 7 15:23:23 2018
New Revision: 324542
URL: http://llvm.org/viewvc/llvm-project?rev=324542&view=rev
Log:
Fix compilation in C++17 mode.
C++17 removes `std::unexpected_handler`, but libc++abi needs it to define
`__cxa_exception`. When building against libc++, this is easily rectified by
telling libc++ we're building the library. We already do this in the other
places where we need these symbols.
Differential Revision: https://reviews.llvm.org/D42987
Modified:
libcxxabi/trunk/src/cxa_exception.cpp
Modified: libcxxabi/trunk/src/cxa_exception.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_exception.cpp?rev=324542&r1=324541&r2=324542&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_exception.cpp (original)
+++ libcxxabi/trunk/src/cxa_exception.cpp Wed Feb 7 15:23:23 2018
@@ -11,6 +11,8 @@
//
//===----------------------------------------------------------------------===//
+#define _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
+
#include "cxxabi.h"
#include <exception> // for std::terminate
More information about the cfe-commits
mailing list