From f5450d0a5a1314d15ed88a11f0838471c3dc4ad6 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 23 Apr 2019 14:05:04 +0000 Subject: [PATCH] [libc++] Remove redundant conditionals for Apple platforms Summary: In a bunch of places, we used to check whether LIBCXX_BUILDING_LIBCXXABI is defined OR we're building for an Apple platform. This used to be necessary in a time when Apple's build script did NOT define LIBCXX_BUILDING_LIBCXXABI. However this is not relevant anymore since Apple's build does define LIBCXX_BUILDING_LIBCXXABI. Reviewers: EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits Tags: #libc Differential Revision: https://reviews.llvm.org/D60842 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@358988 91177308-0d34-0410-b5e6-96231b3b80d8 --- src/exception.cpp | 3 +-- src/support/runtime/stdexcept_default.ipp | 3 +-- src/typeinfo.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/exception.cpp b/src/exception.cpp index ee9f384b6..fce6db7c3 100644 --- a/src/exception.cpp +++ b/src/exception.cpp @@ -10,8 +10,7 @@ #include "new" #include "typeinfo" -#if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI) || \ - (defined(__APPLE__) && !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY)) +#if defined(LIBCXXRT) || defined(LIBCXX_BUILDING_LIBCXXABI) #include using namespace __cxxabiv1; #define HAVE_DEPENDENT_EH_ABI 1 diff --git a/src/support/runtime/stdexcept_default.ipp b/src/support/runtime/stdexcept_default.ipp index 91dd54b28..c827ca4c5 100644 --- a/src/support/runtime/stdexcept_default.ipp +++ b/src/support/runtime/stdexcept_default.ipp @@ -10,8 +10,7 @@ /* For _LIBCPPABI_VERSION */ #if !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) && \ - (defined(LIBCXX_BUILDING_LIBCXXABI) || defined(__APPLE__) || \ - defined(LIBCXXRT)) + (defined(LIBCXX_BUILDING_LIBCXXABI) || defined(LIBCXXRT)) #include #endif diff --git a/src/typeinfo.cpp b/src/typeinfo.cpp index 5b893b1e6..49a07ef7d 100644 --- a/src/typeinfo.cpp +++ b/src/typeinfo.cpp @@ -45,11 +45,11 @@ size_t std::type_info::hash_code() const _NOEXCEPT { } #endif // _LIBCPP_ABI_MICROSOFT -// FIXME: Remove __APPLE__ default here once buildit is gone. // FIXME: Remove the _LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY configuration. -#if (!defined(LIBCXX_BUILDING_LIBCXXABI) && !defined(LIBCXXRT) && \ - !defined(__GLIBCXX__) && !defined(__APPLE__) && \ - !defined(_LIBCPP_ABI_VCRUNTIME)) || \ +#if (!defined(LIBCXX_BUILDING_LIBCXXABI) && \ + !defined(LIBCXXRT) && \ + !defined(__GLIBCXX__) && \ + !defined(_LIBCPP_ABI_VCRUNTIME)) || \ defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) std::type_info::~type_info() {