diff options
author | Ranjeet Singh <Ranjeet.Singh@arm.com> | 2017-03-01 14:42:01 +0300 |
---|---|---|
committer | Ranjeet Singh <Ranjeet.Singh@arm.com> | 2017-03-01 14:42:01 +0300 |
commit | ef6e672d046010dab3a59fb6d8a5fde6bbafedd5 (patch) | |
tree | 6694a33db9819b264863033d8be849959361bb35 /libcxxabi/src/cxa_personality.cpp | |
parent | a53823effdf2fc855ab51f5a359ae578921f4fb7 (diff) |
[libcxxabi] Clean up macro usage.
Convention in libcxxabi is to use !defined(FOO) not !FOO.
Differential Revision: https://reviews.llvm.org/D30459
llvm-svn: 296612
Diffstat (limited to 'libcxxabi/src/cxa_personality.cpp')
-rw-r--r-- | libcxxabi/src/cxa_personality.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libcxxabi/src/cxa_personality.cpp b/libcxxabi/src/cxa_personality.cpp index ee69fdeb4586..7213a03ee25d 100644 --- a/libcxxabi/src/cxa_personality.cpp +++ b/libcxxabi/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 |