diff options
author | Howard Hinnant <hhinnant@apple.com> | 2012-07-26 17:42:39 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2012-07-26 17:42:39 +0000 |
commit | dce0696a3601d73fddd216a4092c287ede0ac9a7 (patch) | |
tree | 3428309648f7b89b5ad4b6aa0cfdafebc01238ca /libcxx/src/typeinfo.cpp | |
parent | a5fc75f4f561a5a82c9c0d097ff880a6074698e6 (diff) | |
download | bcm5719-llvm-dce0696a3601d73fddd216a4092c287ede0ac9a7.tar.gz bcm5719-llvm-dce0696a3601d73fddd216a4092c287ede0ac9a7.zip |
Patch by Andrew C. Morrow: Conditionally include cxxabi.h in new.cpp and typeinfo.cpp. Both new.cpp and typeinfo.cpp have code that is conditionally compiled
based on the LIBCXXRT and _LIBCPPABI_VERSION defines, but those files
do not currently include <cxxabi.h> in the non __APPLE__ case. The
attached patch updates those files so that for non __APPLE__ builds
<cxxabi.h> is included if available or if LIBCXXRT is set. I'm
modeling this on the recent updates to exception.cpp.
llvm-svn: 160790
Diffstat (limited to 'libcxx/src/typeinfo.cpp')
-rw-r--r-- | libcxx/src/typeinfo.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libcxx/src/typeinfo.cpp b/libcxx/src/typeinfo.cpp index cfc64ef57a6..6bab0771f42 100644 --- a/libcxx/src/typeinfo.cpp +++ b/libcxx/src/typeinfo.cpp @@ -7,8 +7,15 @@ // //===----------------------------------------------------------------------===// #include <stdlib.h> + +#ifndef __has_include +#define __has_include(inc) 0 +#endif + #if __APPLE__ #include <cxxabi.h> +#elif defined(LIBCXXRT) || __has_include(<cxxabi.h>) +#include <cxxabi.h> #endif #include "typeinfo" |