[libcxxabi] r296567 - Fix non-reserved macro names LIBCXXABI_NORETURN and LIBCXXABI_ARM_EHABI.
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 28 18:23:54 PST 2017
Author: ericwf
Date: Tue Feb 28 20:23:54 2017
New Revision: 296567
URL: http://llvm.org/viewvc/llvm-project?rev=296567&view=rev
Log:
Fix non-reserved macro names LIBCXXABI_NORETURN and LIBCXXABI_ARM_EHABI.
This patch adds the required leading underscore to those macros.
Modified:
libcxxabi/trunk/include/__cxxabi_config.h
libcxxabi/trunk/include/cxxabi.h
libcxxabi/trunk/src/cxa_aux_runtime.cpp
libcxxabi/trunk/src/cxa_exception.cpp
libcxxabi/trunk/src/cxa_exception.hpp
libcxxabi/trunk/src/cxa_personality.cpp
libcxxabi/trunk/src/cxa_virtual.cpp
Modified: libcxxabi/trunk/include/__cxxabi_config.h
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/include/__cxxabi_config.h?rev=296567&r1=296566&r2=296567&view=diff
==============================================================================
--- libcxxabi/trunk/include/__cxxabi_config.h (original)
+++ libcxxabi/trunk/include/__cxxabi_config.h Tue Feb 28 20:23:54 2017
@@ -12,9 +12,9 @@
#if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
!defined(__ARM_DWARF_EH__)
-#define LIBCXXABI_ARM_EHABI 1
+#define _LIBCXXABI_ARM_EHABI 1
#else
-#define LIBCXXABI_ARM_EHABI 0
+#define _LIBCXXABI_ARM_EHABI 0
#endif
#if !defined(__has_attribute)
Modified: libcxxabi/trunk/include/cxxabi.h
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/include/cxxabi.h?rev=296567&r1=296566&r2=296567&view=diff
==============================================================================
--- libcxxabi/trunk/include/cxxabi.h (original)
+++ libcxxabi/trunk/include/cxxabi.h Tue Feb 28 20:23:54 2017
@@ -21,7 +21,7 @@
#include <__cxxabi_config.h>
#define _LIBCPPABI_VERSION 1002
-#define LIBCXXABI_NORETURN __attribute__((noreturn))
+#define _LIBCXXABI_NORETURN __attribute__((noreturn))
#ifdef __cplusplus
@@ -45,7 +45,7 @@ extern _LIBCXXABI_FUNC_VIS void
__cxa_free_exception(void *thrown_exception) throw();
// 2.4.3 Throwing the Exception Object
-extern _LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void
+extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void
__cxa_throw(void *thrown_exception, std::type_info *tinfo,
void (*dest)(void *));
@@ -55,7 +55,7 @@ __cxa_get_exception_ptr(void *exceptionO
extern _LIBCXXABI_FUNC_VIS void *
__cxa_begin_catch(void *exceptionObject) throw();
extern _LIBCXXABI_FUNC_VIS void __cxa_end_catch();
-#if LIBCXXABI_ARM_EHABI
+#if _LIBCXXABI_ARM_EHABI
extern _LIBCXXABI_FUNC_VIS bool
__cxa_begin_cleanup(void *exceptionObject) throw();
extern _LIBCXXABI_FUNC_VIS void __cxa_end_cleanup();
@@ -63,19 +63,19 @@ extern _LIBCXXABI_FUNC_VIS void __cxa_en
extern _LIBCXXABI_FUNC_VIS std::type_info *__cxa_current_exception_type();
// 2.5.4 Rethrowing Exceptions
-extern _LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void __cxa_rethrow();
+extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_rethrow();
// 2.6 Auxiliary Runtime APIs
-extern _LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void __cxa_bad_cast(void);
-extern _LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void __cxa_bad_typeid(void);
-extern _LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void
+extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_bad_cast(void);
+extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_bad_typeid(void);
+extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void
__cxa_throw_bad_array_new_length(void);
// 3.2.6 Pure Virtual Function API
-extern _LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void __cxa_pure_virtual(void);
+extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_pure_virtual(void);
// 3.2.7 Deleted Virtual Function API
-extern _LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void __cxa_deleted_virtual(void);
+extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_deleted_virtual(void);
// 3.3.2 One-time Construction API
#ifdef __arm__
Modified: libcxxabi/trunk/src/cxa_aux_runtime.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_aux_runtime.cpp?rev=296567&r1=296566&r2=296567&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_aux_runtime.cpp (original)
+++ libcxxabi/trunk/src/cxa_aux_runtime.cpp Tue Feb 28 20:23:54 2017
@@ -16,7 +16,7 @@
namespace __cxxabiv1 {
extern "C" {
-_LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void __cxa_bad_cast(void) {
+_LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_bad_cast(void) {
#ifndef _LIBCXXABI_NO_EXCEPTIONS
throw std::bad_cast();
#else
@@ -24,7 +24,7 @@ _LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN v
#endif
}
-_LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void __cxa_bad_typeid(void) {
+_LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_bad_typeid(void) {
#ifndef _LIBCXXABI_NO_EXCEPTIONS
throw std::bad_typeid();
#else
@@ -32,7 +32,7 @@ _LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN v
#endif
}
-_LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void
+_LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void
__cxa_throw_bad_array_new_length(void) {
#ifndef _LIBCXXABI_NO_EXCEPTIONS
throw std::bad_array_new_length();
Modified: libcxxabi/trunk/src/cxa_exception.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_exception.cpp?rev=296567&r1=296566&r2=296567&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_exception.cpp (original)
+++ libcxxabi/trunk/src/cxa_exception.cpp Tue Feb 28 20:23:54 2017
@@ -120,7 +120,7 @@ exception_cleanup_func(_Unwind_Reason_Co
__cxa_decrement_exception_refcount(unwind_exception + 1);
}
-static LIBCXXABI_NORETURN void failed_throw(__cxa_exception* exception_header) {
+static _LIBCXXABI_NORETURN void failed_throw(__cxa_exception* exception_header) {
// Section 2.5.3 says:
// * For purposes of this ABI, several things are considered exception handlers:
// ** A terminate() call due to a throw.
@@ -202,7 +202,7 @@ handler, _Unwind_RaiseException may retu
will call terminate, assuming that there was no handler for the
exception.
*/
-_LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void
+_LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void
__cxa_throw(void *thrown_object, std::type_info *tinfo, void (*dest)(void *)) {
__cxa_eh_globals *globals = __cxa_get_globals();
__cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
@@ -237,7 +237,7 @@ The adjusted pointer is computed by the
*/
_LIBCXXABI_FUNC_VIS
void *__cxa_get_exception_ptr(void *unwind_exception) throw() {
-#if LIBCXXABI_ARM_EHABI
+#if _LIBCXXABI_ARM_EHABI
return reinterpret_cast<void*>(
static_cast<_Unwind_Control_Block*>(unwind_exception)->barrier_cache.bitpattern[0]);
#else
@@ -246,7 +246,7 @@ void *__cxa_get_exception_ptr(void *unwi
#endif
}
-#if LIBCXXABI_ARM_EHABI
+#if _LIBCXXABI_ARM_EHABI
/*
The routine to be called before the cleanup. This will save __cxa_exception in
__cxa_eh_globals, so that __cxa_end_cleanup() can recover later.
@@ -329,7 +329,7 @@ asm (
" bl abort\n"
" .popsection"
);
-#endif // LIBCXXABI_ARM_EHABI
+#endif // _LIBCXXABI_ARM_EHABI
/*
This routine can catch foreign or native exceptions. If native, the exception
@@ -389,7 +389,7 @@ __cxa_begin_catch(void* unwind_arg) thro
globals->caughtExceptions = exception_header;
}
globals->uncaughtExceptions -= 1; // Not atomically, since globals are thread-local
-#if LIBCXXABI_ARM_EHABI
+#if _LIBCXXABI_ARM_EHABI
return reinterpret_cast<void*>(exception_header->unwindHeader.barrier_cache.bitpattern[0]);
#else
return exception_header->adjustedPtr;
@@ -525,7 +525,7 @@ If the exception is native:
Note: exception_header may be masquerading as a __cxa_dependent_exception
and that's ok.
*/
-_LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN void __cxa_rethrow() {
+_LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_rethrow() {
__cxa_eh_globals* globals = __cxa_get_globals();
__cxa_exception* exception_header = globals->caughtExceptions;
if (NULL == exception_header)
Modified: libcxxabi/trunk/src/cxa_exception.hpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_exception.hpp?rev=296567&r1=296566&r2=296567&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_exception.hpp (original)
+++ libcxxabi/trunk/src/cxa_exception.hpp Tue Feb 28 20:23:54 2017
@@ -27,7 +27,7 @@ static const uint64_t kOurDependentExcep
static const uint64_t get_vendor_and_language = 0xFFFFFFFFFFFFFF00; // mask for CLNGC++
struct __cxa_exception {
-#if defined(__LP64__) || LIBCXXABI_ARM_EHABI
+#if defined(__LP64__) || _LIBCXXABI_ARM_EHABI
// This is a new field to support C++ 0x exception_ptr.
// For binary compatibility it is at the start of this
// struct which is prepended to the object thrown in
@@ -45,7 +45,7 @@ struct __cxa_exception {
int handlerCount;
-#if LIBCXXABI_ARM_EHABI
+#if _LIBCXXABI_ARM_EHABI
__cxa_exception* nextPropagatingException;
int propagationCount;
#else
@@ -56,7 +56,7 @@ struct __cxa_exception {
void *adjustedPtr;
#endif
-#if !defined(__LP64__) && !LIBCXXABI_ARM_EHABI
+#if !defined(__LP64__) && !_LIBCXXABI_ARM_EHABI
// This is a new field to support C++ 0x exception_ptr.
// For binary compatibility it is placed where the compiler
// previously adding padded to 64-bit align unwindHeader.
@@ -70,7 +70,7 @@ struct __cxa_exception {
// The layout of this structure MUST match the layout of __cxa_exception, with
// primaryException instead of referenceCount.
struct __cxa_dependent_exception {
-#if defined(__LP64__) || LIBCXXABI_ARM_EHABI
+#if defined(__LP64__) || _LIBCXXABI_ARM_EHABI
void* primaryException;
#endif
@@ -83,7 +83,7 @@ struct __cxa_dependent_exception {
int handlerCount;
-#if LIBCXXABI_ARM_EHABI
+#if _LIBCXXABI_ARM_EHABI
__cxa_exception* nextPropagatingException;
int propagationCount;
#else
@@ -94,7 +94,7 @@ struct __cxa_dependent_exception {
void *adjustedPtr;
#endif
-#if !defined(__LP64__) && !LIBCXXABI_ARM_EHABI
+#if !defined(__LP64__) && !_LIBCXXABI_ARM_EHABI
void* primaryException;
#endif
@@ -104,7 +104,7 @@ struct __cxa_dependent_exception {
struct __cxa_eh_globals {
__cxa_exception * caughtExceptions;
unsigned int uncaughtExceptions;
-#if LIBCXXABI_ARM_EHABI
+#if _LIBCXXABI_ARM_EHABI
__cxa_exception* propagatingExceptions;
#endif
};
Modified: libcxxabi/trunk/src/cxa_personality.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_personality.cpp?rev=296567&r1=296566&r2=296567&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_personality.cpp (original)
+++ libcxxabi/trunk/src/cxa_personality.cpp Tue Feb 28 20:23:54 2017
@@ -317,7 +317,7 @@ call_terminate(bool native_exception, _U
std::terminate();
}
-#if LIBCXXABI_ARM_EHABI
+#if _LIBCXXABI_ARM_EHABI
static const void* read_target2_value(const void* ptr)
{
uintptr_t offset = *reinterpret_cast<const uintptr_t*>(ptr);
@@ -358,7 +358,7 @@ get_shim_type_info(uint64_t ttypeIndex,
return reinterpret_cast<const __shim_type_info *>(
read_target2_value(ttypePtr));
}
-#else // !LIBCXXABI_ARM_EHABI
+#else // !_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,
classInfo -= ttypeIndex;
return (const __shim_type_info*)readEncodedPointer(&classInfo, ttypeEncoding);
}
-#endif // !LIBCXXABI_ARM_EHABI
+#endif // !_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,
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 _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 !_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 _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
Modified: libcxxabi/trunk/src/cxa_virtual.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_virtual.cpp?rev=296567&r1=296566&r2=296567&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_virtual.cpp (original)
+++ libcxxabi/trunk/src/cxa_virtual.cpp Tue Feb 28 20:23:54 2017
@@ -12,12 +12,12 @@
namespace __cxxabiv1 {
extern "C" {
-_LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN
+_LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN
void __cxa_pure_virtual(void) {
abort_message("Pure virtual function called!");
}
-_LIBCXXABI_FUNC_VIS LIBCXXABI_NORETURN
+_LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN
void __cxa_deleted_virtual(void) {
abort_message("Deleted virtual function called!");
}
More information about the cfe-commits
mailing list