diff options
author | Howard Hinnant <hhinnant@apple.com> | 2012-03-14 19:30:00 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2012-03-14 19:30:00 +0000 |
commit | baae2be6243856b0c58b5154c1f99e1560db47db (patch) | |
tree | abb30bc70e41f2f09acbfaa6c0499a98b32bb484 | |
parent | d4e9059fe0af95c0b0ef75f99e8c1a5b005c3ca2 (diff) | |
download | bcm5719-llvm-baae2be6243856b0c58b5154c1f99e1560db47db.tar.gz bcm5719-llvm-baae2be6243856b0c58b5154c1f99e1560db47db.zip |
Enable __arm__ on apple
llvm-svn: 152735
-rw-r--r-- | libcxxabi/include/cxxabi.h | 2 | ||||
-rw-r--r-- | libcxxabi/src/cxa_guard.cpp | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/libcxxabi/include/cxxabi.h b/libcxxabi/include/cxxabi.h index b0994d1c45d..f769b86fe20 100644 --- a/libcxxabi/include/cxxabi.h +++ b/libcxxabi/include/cxxabi.h @@ -64,7 +64,7 @@ extern LIBCXXABI_NORETURN void __cxa_pure_virtual(void); extern LIBCXXABI_NORETURN void __cxa_deleted_virtual(void); // 3.3.2 One-time Construction API -#ifdef LIBCXXABI_ARMEABI +#if __arm__ extern int __cxa_guard_acquire(uint32_t*); extern void __cxa_guard_release(uint32_t*); extern void __cxa_guard_abort(uint32_t*); diff --git a/libcxxabi/src/cxa_guard.cpp b/libcxxabi/src/cxa_guard.cpp index 814aaeb18f0..a8d5bae8166 100644 --- a/libcxxabi/src/cxa_guard.cpp +++ b/libcxxabi/src/cxa_guard.cpp @@ -28,7 +28,7 @@ namespace __cxxabiv1 namespace { -#if LIBCXXABI_ARMEABI +#if __arm__ // A 32-bit, 4-byte-aligned static data value. The least significant 2 bits must // be statically initialized to 0. @@ -62,7 +62,7 @@ void set_initialized(guard_type* guard_object) { pthread_mutex_t guard_mut = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t guard_cv = PTHREAD_COND_INITIALIZER; -#if __APPLE__ +#if defined(__APPLE__) && !defined(__arm_) typedef uint32_t lock_type; @@ -100,7 +100,7 @@ set_lock(uint64_t& x, lock_type y) #endif // __LITTLE_ENDIAN__ -#else // __APPLE__ +#else // !__APPLE__ || __arm__ typedef bool lock_type; @@ -169,7 +169,7 @@ int __cxa_guard_acquire(guard_type* guard_object) int result = *initialized == 0; if (result) { -#if __APPLE__ +#if defined(__APPLE__) && !defined(__arm_) const lock_type id = pthread_mach_thread_np(pthread_self()); lock_type lock = get_lock(*guard_object); if (lock) @@ -189,14 +189,14 @@ int __cxa_guard_acquire(guard_type* guard_object) } else set_lock(*guard_object, id); -#else // __APPLE__ +#else // !__APPLE__ || __arm__ while (get_lock(*guard_object)) if (pthread_cond_wait(&guard_cv, &guard_mut)) abort_message("__cxa_guard_acquire condition variable wait failed"); result = *initialized == 0; if (result) set_lock(*guard_object, true); -#endif // __APPLE__ +#endif // !__APPLE__ || __arm__ } if (pthread_mutex_unlock(&guard_mut)) abort_message("__cxa_guard_acquire failed to release mutex"); |