From: Craig Topper Date: Sun, 24 Mar 2019 18:00:20 +0000 (+0000) Subject: [X86] Make _bswap intrinsic a function instead of a macro to hopefully fix the chromi... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14891bbc892662cbc7d7b4b8f033ebe62fba41dc;p=clang [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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356862 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Headers/ia32intrin.h b/lib/Headers/ia32intrin.h index 6bd57ec2f0..64ead34796 100644 --- a/lib/Headers/ia32intrin.h +++ b/lib/Headers/ia32intrin.h @@ -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))