summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2018-02-07 23:23:23 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2018-02-07 23:23:23 +0000
commit8e6107a0e49940646d08e5d703d2d128000bcdea (patch)
treeaea807635bcee314026bb27b1fd402bc96cf79b2 /libcxxabi/src
parentdee75682c88011971ab39b861d32f1c4a826661a (diff)
downloadbcm5719-llvm-8e6107a0e49940646d08e5d703d2d128000bcdea.tar.gz
bcm5719-llvm-8e6107a0e49940646d08e5d703d2d128000bcdea.zip
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 llvm-svn: 324542
Diffstat (limited to 'libcxxabi/src')
-rw-r--r--libcxxabi/src/cxa_exception.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcxxabi/src/cxa_exception.cpp b/libcxxabi/src/cxa_exception.cpp
index d5230cdc7d9..b77f3a80796 100644
--- a/libcxxabi/src/cxa_exception.cpp
+++ b/libcxxabi/src/cxa_exception.cpp
@@ -11,6 +11,8 @@
//
//===----------------------------------------------------------------------===//
+#define _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
+
#include "cxxabi.h"
#include <exception> // for std::terminate
OpenPOWER on IntegriCloud