Removed raw references to __APPLE__; now just check to see if it is defined.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177297 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "chrono"
|
||||
#include <sys/time.h> //for gettimeofday and timeval
|
||||
#if __APPLE__
|
||||
#ifdef __APPLE__
|
||||
#include <mach/mach_time.h> // mach_absolute_time, mach_timebase_info_data_t
|
||||
#else /* !__APPLE__ */
|
||||
#include <cerrno> // errno
|
||||
@@ -50,7 +50,7 @@ system_clock::from_time_t(time_t t) _NOEXCEPT
|
||||
|
||||
const bool steady_clock::is_steady;
|
||||
|
||||
#if __APPLE__
|
||||
#ifdef __APPLE__
|
||||
// mach_absolute_time() * MachInfo.numer / MachInfo.denom is the number of
|
||||
// nanoseconds since the computer booted up. MachInfo.numer and MachInfo.denom
|
||||
// are run time constants supplied by the OS. This clock has no relationship
|
||||
|
@@ -14,7 +14,7 @@
|
||||
#define __has_include(inc) 0
|
||||
#endif
|
||||
|
||||
#if __APPLE__
|
||||
#ifdef __APPLE__
|
||||
#include <cxxabi.h>
|
||||
|
||||
using namespace __cxxabiv1;
|
||||
@@ -102,7 +102,7 @@ terminate() _NOEXCEPT
|
||||
#if !defined(LIBCXXRT) && !defined(__GLIBCXX__)
|
||||
bool uncaught_exception() _NOEXCEPT
|
||||
{
|
||||
#if __APPLE__ || defined(_LIBCPPABI_VERSION)
|
||||
#if defined(__APPLE__) || defined(_LIBCPPABI_VERSION)
|
||||
// on Darwin, there is a helper function so __cxa_get_globals is private
|
||||
return __cxa_uncaught_exception();
|
||||
#else // __APPLE__
|
||||
|
@@ -15,7 +15,7 @@
|
||||
#define __has_include(inc) 0
|
||||
#endif
|
||||
|
||||
#if __APPLE__
|
||||
#ifdef __APPLE__
|
||||
#include <cxxabi.h>
|
||||
|
||||
#ifndef _LIBCPPABI_VERSION
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#define __has_include(inc) 0
|
||||
#endif
|
||||
|
||||
#if __APPLE__
|
||||
#ifdef __APPLE__
|
||||
#include <cxxabi.h>
|
||||
#elif defined(LIBCXXRT) || __has_include(<cxxabi.h>)
|
||||
#include <cxxabi.h>
|
||||
|
@@ -12,7 +12,7 @@
|
||||
#define __has_include(inc) 0
|
||||
#endif
|
||||
|
||||
#if __APPLE__
|
||||
#ifdef __APPLE__
|
||||
#include <cxxabi.h>
|
||||
#elif defined(LIBCXXRT) || __has_include(<cxxabi.h>)
|
||||
#include <cxxabi.h>
|
||||
@@ -50,7 +50,7 @@ std::bad_typeid::what() const _NOEXCEPT
|
||||
return "std::bad_typeid";
|
||||
}
|
||||
|
||||
#if __APPLE__
|
||||
#ifdef __APPLE__
|
||||
// On Darwin, the cxa_bad_* functions cannot be in the lower level library
|
||||
// because bad_cast and bad_typeid are defined in his higher level library
|
||||
void __cxxabiv1::__cxa_bad_typeid() { throw std::bad_typeid(); }
|
||||
|
Reference in New Issue
Block a user