[X86] Make _bswap intrinsic a function instead of a macro to hopefully fix the chromi...
authorCraig Topper <craig.topper@intel.com>
Sun, 24 Mar 2019 18:00:20 +0000 (18:00 +0000)
committerCraig Topper <craig.topper@intel.com>
Sun, 24 Mar 2019 18:00:20 +0000 (18:00 +0000)
This intrinsic was added in r356848 but was implemented as a macro to match gcc.

llvm-svn: 356862

clang/lib/Headers/ia32intrin.h

index 6bd57ec..64ead34 100644 (file)
@@ -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))