Remove a long-standing __has_include hack.
This was put in to get libc++ building without libcxxabi. We now have
macros that show that we are building against libcxxabi so use that
instead. This guards against existing but broken cxxabi.h headers on the
system.
llvm-svn: 250507
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 929df471a94c92ab744c5af7a33de5a0ad6699d2
diff --git a/src/new.cpp b/src/new.cpp
index 1144651..f4f73d8 100644
--- a/src/new.cpp
+++ b/src/new.cpp
@@ -13,10 +13,6 @@
#include "new"
-#ifndef __has_include
-#define __has_include(inc) 0
-#endif
-
#if defined(__APPLE__) && !defined(LIBCXXRT)
#include <cxxabi.h>
@@ -27,9 +23,9 @@
#define __new_handler __cxxabiapple::__cxa_new_handler
#endif
#else // __APPLE__
- #if defined(LIBCXXRT) || __has_include(<cxxabi.h>)
+ #if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI)
#include <cxxabi.h>
- #endif // __has_include(<cxxabi.h>)
+ #endif // defined(LIBCXX_BUILDING_LIBCXXABI)
#if !defined(_LIBCPPABI_VERSION) && !defined(__GLIBCXX__)
static std::new_handler __new_handler;
#endif // _LIBCPPABI_VERSION