[libunwind] r267509 - unwind: remove last instance of -Wexpansion-to-defined

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 25 18:11:29 PDT 2016


Author: compnerd
Date: Mon Apr 25 20:11:29 2016
New Revision: 267509

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

This unifies the definition of _LIBUNWIND_BUILD_SJLJ_APIS.  It also further
generalises the definition to allow building these APIs on non-Apple targets
when `-fsjlj-excceptions` is used.  The header is now clean of macros which
expand to defined checks.

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=267509&r1=267508&r2=267509&view=diff
==============================================================================
--- libunwind/trunk/src/config.h (original)
+++ libunwind/trunk/src/config.h Mon Apr 25 20:11:29 2016
@@ -30,8 +30,6 @@
 
 // Platform specific configuration defines.
 #ifdef __APPLE__
-  #define _LIBUNWIND_BUILD_SJLJ_APIS      defined(__arm__)
-
   #if defined(FOR_DYLD)
     #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND 1
     #define _LIBUNWIND_SUPPORT_DWARF_UNWIND   0
@@ -42,8 +40,6 @@
     #define _LIBUNWIND_SUPPORT_DWARF_INDEX    0
   #endif
 #else
-  #define _LIBUNWIND_BUILD_SJLJ_APIS      0
-
   #if defined(__ARM_DWARF_EH__) || !defined(__arm__)
     #define _LIBUNWIND_SUPPORT_COMPACT_UNWIND 0
     #define _LIBUNWIND_SUPPORT_DWARF_UNWIND 1
@@ -59,6 +55,12 @@
 #define _LIBUNWIND_EXPORT __attribute__((visibility("default")))
 #define _LIBUNWIND_HIDDEN __attribute__((visibility("hidden")))
 
+#if (defined(__APPLE__) && defined(__arm__)) || defined(__USING_SJLJ_EXCEPTIONS__)
+#define _LIBUNWIND_BUILD_SJLJ_APIS 1
+#else
+#define _LIBUNWIND_BUILD_SJLJ_APIS 0
+#endif
+
 #if defined(__i386__) || defined(__x86_64__)
 #define _LIBUNWIND_SUPPORT_FRAME_APIS 1
 #else




More information about the cfe-commits mailing list