diff options
author | Ranjeet Singh <Ranjeet.Singh@arm.com> | 2017-03-01 11:42:01 +0000 |
---|---|---|
committer | Ranjeet Singh <Ranjeet.Singh@arm.com> | 2017-03-01 11:42:01 +0000 |
commit | 2ecb4ee2222ad37b0d4da0812fa09edd3834a5d3 (patch) | |
tree | ebbef5403bd31f3a768a0775227a0e469004c08f /src/cxa_personality.cpp | |
parent | 54227aec1d6116c936afa576e2ea36ca3e94b29c (diff) |
[libcxxabi] Clean up macro usage.
Convention in libcxxabi is to use !defined(FOO) not !FOO.
Differential Revision: https://reviews.llvm.org/D30459
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@296612 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'src/cxa_personality.cpp')
-rw-r--r-- | src/cxa_personality.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cxa_personality.cpp b/src/cxa_personality.cpp index ee69fde..7213a03 100644 --- a/src/cxa_personality.cpp +++ b/src/cxa_personality.cpp @@ -317,7 +317,7 @@ call_terminate(bool native_exception, _Unwind_Exception* unwind_exception) std::terminate(); } -#if _LIBCXXABI_ARM_EHABI +#if defined(_LIBCXXABI_ARM_EHABI) static const void* read_target2_value(const void* ptr) { uintptr_t offset = *reinterpret_cast<const uintptr_t*>(ptr); @@ -328,7 +328,7 @@ static const void* read_target2_value(const void* ptr) // deferred to the linker. For bare-metal they turn into absolute // relocations. For linux they turn into GOT-REL relocations." // https://gcc.gnu.org/ml/gcc-patches/2009-08/msg00264.html -#if LIBCXXABI_BAREMETAL +#if defined(LIBCXXABI_BAREMETAL) return reinterpret_cast<const void*>(reinterpret_cast<uintptr_t>(ptr) + offset); #else @@ -358,7 +358,7 @@ get_shim_type_info(uint64_t ttypeIndex, const uint8_t* classInfo, return reinterpret_cast<const __shim_type_info *>( read_target2_value(ttypePtr)); } -#else // !_LIBCXXABI_ARM_EHABI +#else // !defined(_LIBCXXABI_ARM_EHABI) static const __shim_type_info* get_shim_type_info(uint64_t ttypeIndex, const uint8_t* classInfo, @@ -394,7 +394,7 @@ get_shim_type_info(uint64_t ttypeIndex, const uint8_t* classInfo, classInfo -= ttypeIndex; return (const __shim_type_info*)readEncodedPointer(&classInfo, ttypeEncoding); } -#endif // !_LIBCXXABI_ARM_EHABI +#endif // !defined(_LIBCXXABI_ARM_EHABI) /* This is checking a thrown exception type, excpType, against a possibly empty @@ -405,7 +405,7 @@ get_shim_type_info(uint64_t ttypeIndex, const uint8_t* classInfo, the list will catch a excpType. If any catchType in the list can catch an excpType, then this exception spec does not catch the excpType. */ -#if _LIBCXXABI_ARM_EHABI +#if defined(_LIBCXXABI_ARM_EHABI) static bool exception_spec_can_catch(int64_t specIndex, const uint8_t* classInfo, @@ -934,7 +934,7 @@ _UA_CLEANUP_PHASE Else a cleanup is not found: return _URC_CONTINUE_UNWIND */ -#if !_LIBCXXABI_ARM_EHABI +#if !defined(_LIBCXXABI_ARM_EHABI) _LIBCXXABI_FUNC_VIS _Unwind_Reason_Code #ifdef __USING_SJLJ_EXCEPTIONS__ __gxx_personality_sj0 @@ -1194,7 +1194,7 @@ __cxa_call_unexpected(void* arg) u_handler = old_exception_header->unexpectedHandler; // If std::__unexpected(u_handler) rethrows the same exception, // these values get overwritten by the rethrow. So save them now: -#if _LIBCXXABI_ARM_EHABI +#if defined(_LIBCXXABI_ARM_EHABI) ttypeIndex = (int64_t)(int32_t)unwind_exception->barrier_cache.bitpattern[4]; lsda = (const uint8_t*)unwind_exception->barrier_cache.bitpattern[2]; #else |