Fix non-reserved macro names LIBCXXABI_NORETURN and LIBCXXABI_ARM_EHABI.

This patch adds the required leading underscore to those macros.

llvm-svn: 296567
diff --git a/libcxxabi/src/cxa_aux_runtime.cpp b/libcxxabi/src/cxa_aux_runtime.cpp
index bb7c9f1..878d3bd 100644
--- a/libcxxabi/src/cxa_aux_runtime.cpp
+++ b/libcxxabi/src/cxa_aux_runtime.cpp
@@ -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 @@
 #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 @@
 #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();
diff --git a/libcxxabi/src/cxa_exception.cpp b/libcxxabi/src/cxa_exception.cpp
index 757b3d4..08d5627 100644
--- a/libcxxabi/src/cxa_exception.cpp
+++ b/libcxxabi/src/cxa_exception.cpp
@@ -120,7 +120,7 @@
     __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 @@
 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 @@
 */
 _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 @@
 #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 @@
     "	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 @@
             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 @@
   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)
diff --git a/libcxxabi/src/cxa_exception.hpp b/libcxxabi/src/cxa_exception.hpp
index 6e68f98..df550bf 100644
--- a/libcxxabi/src/cxa_exception.hpp
+++ b/libcxxabi/src/cxa_exception.hpp
@@ -27,7 +27,7 @@
 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 @@
 
     int handlerCount;
 
-#if LIBCXXABI_ARM_EHABI
+#if _LIBCXXABI_ARM_EHABI
     __cxa_exception* nextPropagatingException;
     int propagationCount;
 #else
@@ -56,7 +56,7 @@
     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 @@
 // 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 @@
 
     int handlerCount;
 
-#if LIBCXXABI_ARM_EHABI
+#if _LIBCXXABI_ARM_EHABI
     __cxa_exception* nextPropagatingException;
     int propagationCount;
 #else
@@ -94,7 +94,7 @@
     void *adjustedPtr;
 #endif
 
-#if !defined(__LP64__) && !LIBCXXABI_ARM_EHABI
+#if !defined(__LP64__) && !_LIBCXXABI_ARM_EHABI
     void* primaryException;
 #endif
 
@@ -104,7 +104,7 @@
 struct __cxa_eh_globals {
     __cxa_exception *   caughtExceptions;
     unsigned int        uncaughtExceptions;
-#if LIBCXXABI_ARM_EHABI
+#if _LIBCXXABI_ARM_EHABI
     __cxa_exception* propagatingExceptions;
 #endif
 };
diff --git a/libcxxabi/src/cxa_personality.cpp b/libcxxabi/src/cxa_personality.cpp
index 75f6b4a..ee69fde 100644
--- a/libcxxabi/src/cxa_personality.cpp
+++ b/libcxxabi/src/cxa_personality.cpp
@@ -317,7 +317,7 @@
     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 @@
     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 @@
     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 @@
     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 @@
         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 @@
         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
diff --git a/libcxxabi/src/cxa_virtual.cpp b/libcxxabi/src/cxa_virtual.cpp
index ac81ad3..f59fa7e 100644
--- a/libcxxabi/src/cxa_virtual.cpp
+++ b/libcxxabi/src/cxa_virtual.cpp
@@ -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!");
 }