[libcxxabi] r228267 - Some more -Wundef issues.

Dan Albert danalbert at google.com
Wed Feb 4 18:44:50 PST 2015


Author: danalbert
Date: Wed Feb  4 20:44:50 2015
New Revision: 228267

URL: http://llvm.org/viewvc/llvm-project?rev=228267&view=rev
Log:
Some more -Wundef issues.

This should be all of them for Linux. Might be some for the others.

Modified:
    libcxxabi/trunk/include/unwind.h
    libcxxabi/trunk/src/Unwind/AddressSpace.hpp
    libcxxabi/trunk/src/cxa_exception.hpp

Modified: libcxxabi/trunk/include/unwind.h
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/include/unwind.h?rev=228267&r1=228266&r2=228267&view=diff
==============================================================================
--- libcxxabi/trunk/include/unwind.h (original)
+++ libcxxabi/trunk/include/unwind.h Wed Feb  4 20:44:50 2015
@@ -127,7 +127,7 @@ struct _Unwind_Exception {
                             _Unwind_Exception *exc);
   uintptr_t private_1; // non-zero means forced unwind
   uintptr_t private_2; // holds sp that phase1 found for phase2 to use
-#if !__LP64__
+#ifndef __LP64__
   // The gcc implementation of _Unwind_Exception used attribute mode on the
   // above fields which had the side effect of causing this whole struct to
   // round up to 32 bytes in size. To be more explicit, we add pad fields

Modified: libcxxabi/trunk/src/Unwind/AddressSpace.hpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/Unwind/AddressSpace.hpp?rev=228267&r1=228266&r2=228267&view=diff
==============================================================================
--- libcxxabi/trunk/src/Unwind/AddressSpace.hpp (original)
+++ libcxxabi/trunk/src/Unwind/AddressSpace.hpp Wed Feb  4 20:44:50 2015
@@ -35,7 +35,7 @@ namespace libunwind {
 #include "Registers.hpp"
 
 #if LIBCXXABI_ARM_EHABI
-#if __linux__
+#ifdef __linux__
 
 typedef long unsigned int *_Unwind_Ptr;
 extern "C" _Unwind_Ptr __gnu_Unwind_Find_exidx(_Unwind_Ptr addr, int *len);
@@ -91,7 +91,7 @@ struct UnwindInfoSections {
 /// making local unwinds fast.
 class __attribute__((visibility("hidden"))) LocalAddressSpace {
 public:
-#if __LP64__
+#ifdef __LP64__
   typedef uint64_t pint_t;
   typedef int64_t  sint_t;
 #else
@@ -142,7 +142,7 @@ public:
 };
 
 inline uintptr_t LocalAddressSpace::getP(pint_t addr) {
-#if __LP64__
+#ifdef __LP64__
   return get64(addr);
 #else
   return get32(addr);

Modified: libcxxabi/trunk/src/cxa_exception.hpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/cxa_exception.hpp?rev=228267&r1=228266&r2=228267&view=diff
==============================================================================
--- libcxxabi/trunk/src/cxa_exception.hpp (original)
+++ libcxxabi/trunk/src/cxa_exception.hpp Wed Feb  4 20:44:50 2015
@@ -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 __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
@@ -56,7 +56,7 @@ struct __cxa_exception {
     void *adjustedPtr;
 #endif
 
-#if !__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 __LP64__ || LIBCXXABI_ARM_EHABI
+#if defined(__LP64__) || LIBCXXABI_ARM_EHABI
     void* primaryException;
 #endif
     
@@ -94,7 +94,7 @@ struct __cxa_dependent_exception {
     void *adjustedPtr;
 #endif
     
-#if !__LP64__ && !LIBCXXABI_ARM_EHABI
+#if !defined(__LP64__) && !LIBCXXABI_ARM_EHABI
     void* primaryException;
 #endif
 





More information about the cfe-commits mailing list