summaryrefslogtreecommitdiffstats
path: root/libcxx/src/stdexcept.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-04-19 01:36:12 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-04-19 01:36:12 +0000
commit11ffde3d7e866e0a97f298f44a57966ff1f1e507 (patch)
tree37b5d5a88e705552076bfa21e31dd088c449ee5b /libcxx/src/stdexcept.cpp
parenta11810ad606b98a504f6d2ad44ae10df18e3def8 (diff)
downloadbcm5719-llvm-11ffde3d7e866e0a97f298f44a57966ff1f1e507.tar.gz
bcm5719-llvm-11ffde3d7e866e0a97f298f44a57966ff1f1e507.zip
libc++: only #include <cxxabi.h> if it exists. This allows libc++ to build
out of the box on Linux systems. If you're building against libc++abi, you still need to make sure it can find <cxxabi.h> so it knows not to export symbols which libc++abi provides. llvm-svn: 155091
Diffstat (limited to 'libcxx/src/stdexcept.cpp')
-rw-r--r--libcxx/src/stdexcept.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcxx/src/stdexcept.cpp b/libcxx/src/stdexcept.cpp
index b516b0ca68b..9fa4f593137 100644
--- a/libcxx/src/stdexcept.cpp
+++ b/libcxx/src/stdexcept.cpp
@@ -15,7 +15,11 @@
#include <cstdint>
#include <cstddef>
#include "system_error"
+
+// Use <cxxabi.h> to determine whether we're linking against libc++abi.
+#if __has_include(<cxxabi.h>)
#include <cxxabi.h>
+#endif
// Note: optimize for size
OpenPOWER on IntegriCloud