[libunwind] r266915 - unwind: remove an instance of -Wexpansion-to-defined

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 20 13:54:51 PDT 2016


Author: compnerd
Date: Wed Apr 20 15:54:51 2016
New Revision: 266915

URL: http://llvm.org/viewvc/llvm-project?rev=266915&view=rev
Log:
unwind: remove an instance of -Wexpansion-to-defined

This follows the pattern in the Apple clause duplicating a tuple of definitions.
However, it will define them to a value rather than a defined check to remove
the `-Wexpansion-to-defined` warning (which may be treated as an error).

This also opens the door to unifying the two code paths into one.

NFC.

Modified:
    libunwind/trunk/src/config.h

Modified: libunwind/trunk/src/config.h
URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/config.h?rev=266915&r1=266914&r2=266915&view=diff
==============================================================================
--- libunwind/trunk/src/config.h (original)
+++ libunwind/trunk/src/config.h Wed Apr 20 15:54:51 2016
@@ -75,10 +75,15 @@
   #define _LIBUNWIND_LOG(msg, ...) fprintf(stderr, "libuwind: " msg, __VA_ARGS__)
   #define _LIBUNWIND_ABORT(msg) assert_rtn(__func__, __FILE__, __LINE__, msg)
 
-  #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND 0
-  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
-                                          defined(__ARM_DWARF_EH__)
-  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
+  #if defined(__ARM_DWARF_EH__) || !defined(__arm__)
+    #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND 0
+    #define _LIBUNWIND_SUPPORT_DWARF_UNWIND 1
+    #define _LIBUNWIND_SUPPORT_DWARF_INDEX 1
+  #else
+    #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND 0
+    #define _LIBUNWIND_SUPPORT_DWARF_UNWIND 0
+    #define _LIBUNWIND_SUPPORT_DWARF_INDEX 0
+  #endif
 #endif
 
 #define _LIBUNWIND_BUILD_ZERO_COST_APIS                                        \




More information about the cfe-commits mailing list