[libunwind] r266926 - unwind: unify the definition of _LIBUNWIND_SUPPORT_FRAME_APIS
Author: compnerd Date: Wed Apr 20 17:18:47 2016 New Revision: 266926 URL: http://llvm.org/viewvc/llvm-project?rev=266926&view=rev Log: unwind: unify the definition of _LIBUNWIND_SUPPORT_FRAME_APIS Unify the definition of the _LIBUNWIND_SUPPORT_FRAME_APIS macro. This is in preparation to remove another instance of -Wexpansion-to-defined. 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=266926&r1=266925&r2=266926&view=diff == --- libunwind/trunk/src/config.h (original) +++ libunwind/trunk/src/config.h Wed Apr 20 17:18:47 2016 @@ -40,8 +40,6 @@ #endif #define _LIBUNWIND_BUILD_SJLJ_APIS defined(__arm__) - #define _LIBUNWIND_SUPPORT_FRAME_APIS (defined(__i386__) || \ - defined(__x86_64__)) #define _LIBUNWIND_EXPORT __attribute__((visibility("default"))) #define _LIBUNWIND_HIDDEN __attribute__((visibility("hidden"))) #define _LIBUNWIND_LOG(msg, ...) fprintf(stderr, "libuwind: " msg, __VA_ARGS__) @@ -68,8 +66,6 @@ } #define _LIBUNWIND_BUILD_SJLJ_APIS 0 - #define _LIBUNWIND_SUPPORT_FRAME_APIS (defined(__i386__) || \ - defined(__x86_64__)) #define _LIBUNWIND_EXPORT __attribute__((visibility("default"))) #define _LIBUNWIND_HIDDEN __attribute__((visibility("hidden"))) #define _LIBUNWIND_LOG(msg, ...) fprintf(stderr, "libuwind: " msg, __VA_ARGS__) @@ -86,6 +82,8 @@ #endif #endif +#define _LIBUNWIND_SUPPORT_FRAME_APIS (defined(__i386__) || defined(__x86_64__)) + #if defined(__i386__) || defined(__x86_64__) || \ (!defined(__APPLE__) && defined(__arm__)) || \ (defined(__arm64__) || defined(__aarch64__)) || \ ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [libunwind] r266926 - unwind: unify the definition of _LIBUNWIND_SUPPORT_FRAME_APIS
On Wed, Apr 20, 2016 at 3:18 PM, Saleem Abdulrasool via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: compnerd > Date: Wed Apr 20 17:18:47 2016 > New Revision: 266926 > > URL: http://llvm.org/viewvc/llvm-project?rev=266926&view=rev > Log: > unwind: unify the definition of _LIBUNWIND_SUPPORT_FRAME_APIS > > Unify the definition of the _LIBUNWIND_SUPPORT_FRAME_APIS macro. This is > in > preparation to remove another instance of -Wexpansion-to-defined. 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=266926&r1=266925&r2=266926&view=diff > > == > --- libunwind/trunk/src/config.h (original) > +++ libunwind/trunk/src/config.h Wed Apr 20 17:18:47 2016 > @@ -40,8 +40,6 @@ >#endif > >#define _LIBUNWIND_BUILD_SJLJ_APIS defined(__arm__) > - #define _LIBUNWIND_SUPPORT_FRAME_APIS (defined(__i386__) || \ > - defined(__x86_64__)) >#define _LIBUNWIND_EXPORT > __attribute__((visibility("default"))) >#define _LIBUNWIND_HIDDEN > __attribute__((visibility("hidden"))) >#define _LIBUNWIND_LOG(msg, ...) fprintf(stderr, "libuwind: " msg, > __VA_ARGS__) > @@ -68,8 +66,6 @@ >} > >#define _LIBUNWIND_BUILD_SJLJ_APIS 0 > - #define _LIBUNWIND_SUPPORT_FRAME_APIS (defined(__i386__) || \ > - defined(__x86_64__)) >#define _LIBUNWIND_EXPORT > __attribute__((visibility("default"))) >#define _LIBUNWIND_HIDDEN > __attribute__((visibility("hidden"))) >#define _LIBUNWIND_LOG(msg, ...) fprintf(stderr, "libuwind: " msg, > __VA_ARGS__) > @@ -86,6 +82,8 @@ >#endif > #endif > > +#define _LIBUNWIND_SUPPORT_FRAME_APIS (defined(__i386__) || > defined(__x86_64__)) > Producing a 'defined' token by macro expansion isn't required to work (Clang will warn on it; some compilers won't handle it as a 'defined' operator at all). Instead, this should be defined by #if defined(__i386) || defined(__x86_64__) #define _LIBUNWIND_SUPPORT_FRAME_APIS 1 #endif or similar. > + > #if defined(__i386__) || defined(__x86_64__) || > \ > (!defined(__APPLE__) && defined(__arm__)) || > \ > (defined(__arm64__) || defined(__aarch64__)) || > \ > > > ___ > cfe-commits mailing list > cfe-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits > ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: [libunwind] r266926 - unwind: unify the definition of _LIBUNWIND_SUPPORT_FRAME_APIS
On Wed, Apr 20, 2016 at 3:31 PM, Richard Smith wrote: > On Wed, Apr 20, 2016 at 3:18 PM, Saleem Abdulrasool via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: compnerd >> Date: Wed Apr 20 17:18:47 2016 >> New Revision: 266926 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=266926&view=rev >> Log: >> unwind: unify the definition of _LIBUNWIND_SUPPORT_FRAME_APIS >> >> Unify the definition of the _LIBUNWIND_SUPPORT_FRAME_APIS macro. This is >> in >> preparation to remove another instance of -Wexpansion-to-defined. 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=266926&r1=266925&r2=266926&view=diff >> >> == >> --- libunwind/trunk/src/config.h (original) >> +++ libunwind/trunk/src/config.h Wed Apr 20 17:18:47 2016 >> @@ -40,8 +40,6 @@ >>#endif >> >>#define _LIBUNWIND_BUILD_SJLJ_APIS defined(__arm__) >> - #define _LIBUNWIND_SUPPORT_FRAME_APIS (defined(__i386__) || \ >> - defined(__x86_64__)) >>#define _LIBUNWIND_EXPORT >> __attribute__((visibility("default"))) >>#define _LIBUNWIND_HIDDEN >> __attribute__((visibility("hidden"))) >>#define _LIBUNWIND_LOG(msg, ...) fprintf(stderr, "libuwind: " msg, >> __VA_ARGS__) >> @@ -68,8 +66,6 @@ >>} >> >>#define _LIBUNWIND_BUILD_SJLJ_APIS 0 >> - #define _LIBUNWIND_SUPPORT_FRAME_APIS (defined(__i386__) || \ >> - defined(__x86_64__)) >>#define _LIBUNWIND_EXPORT >> __attribute__((visibility("default"))) >>#define _LIBUNWIND_HIDDEN >> __attribute__((visibility("hidden"))) >>#define _LIBUNWIND_LOG(msg, ...) fprintf(stderr, "libuwind: " msg, >> __VA_ARGS__) >> @@ -86,6 +82,8 @@ >>#endif >> #endif >> >> +#define _LIBUNWIND_SUPPORT_FRAME_APIS (defined(__i386__) || >> defined(__x86_64__)) >> > > Producing a 'defined' token by macro expansion isn't required to work > (Clang will warn on it; some compilers won't handle it as a 'defined' > operator at all). Instead, this should be defined by > > #if defined(__i386) || defined(__x86_64__) > #define _LIBUNWIND_SUPPORT_FRAME_APIS 1 > #endif > > or similar. > Ha, and your commit message clearly points out that this was a step towards fixing this issue I described. Sorry for the noise! :) > + >> #if defined(__i386__) || defined(__x86_64__) || >> \ >> (!defined(__APPLE__) && defined(__arm__)) || >>\ >> (defined(__arm64__) || defined(__aarch64__)) || >> \ >> >> >> ___ >> cfe-commits mailing list >> cfe-commits@lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >> > > ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits