Thanks, this helped. > to hopefully fix the chromium build.
I'd argue it's overall more sane. Single underscore followed by lower-case letters isn't reserved in non-global scope, so what gcc is doing isn't quite proper from what I understand. On Sun, Mar 24, 2019 at 1:58 PM Craig Topper via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: ctopper > Date: Sun Mar 24 11:00:20 2019 > New Revision: 356862 > > URL: http://llvm.org/viewvc/llvm-project?rev=356862&view=rev > Log: > [X86] Make _bswap intrinsic a function instead of a macro to hopefully fix > the chromium build. > > This intrinsic was added in r356848 but was implemented as a macro to > match gcc. > > Modified: > cfe/trunk/lib/Headers/ia32intrin.h > > Modified: cfe/trunk/lib/Headers/ia32intrin.h > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/ia32intrin.h?rev=356862&r1=356861&r2=356862&view=diff > > ============================================================================== > --- cfe/trunk/lib/Headers/ia32intrin.h (original) > +++ cfe/trunk/lib/Headers/ia32intrin.h Sun Mar 24 11:00:20 2019 > @@ -78,7 +78,11 @@ __bswapd(int __A) { > return __builtin_bswap32(__A); > } > > -#define _bswap(A) __bswapd((A)) > +static __inline__ int __attribute__((__always_inline__, __nodebug__)) > +_bswap(int __A) { > + return __builtin_bswap32(__A); > +} > + > #define _bit_scan_forward(A) __bsfd((A)) > #define _bit_scan_reverse(A) __bsrd((A)) > > > > _______________________________________________ > cfe-commits mailing list > cfe-commits@lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits