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.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@155091 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Richard Smith 2012-04-19 01:36:12 +00:00
parent 9efdc0bd5f
commit c756f5b4e8

View File

@ -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