llvm.org GIT mirror llvm / add84fe
SwapByteOrder.h: don't check for unsupported GCC versions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368909 91177308-0d34-0410-b5e6-96231b3b80d8 JF Bastien a month ago
1 changed file(s) with 4 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
3838 #endif
3939 }
4040
41 /// SwapByteOrder_32 - This function returns a byte-swapped representation of
42 /// the 32-bit argument.
41 /// This function returns a byte-swapped representation of the 32-bit argument.
4342 inline uint32_t SwapByteOrder_32(uint32_t value) {
44 #if defined(__llvm__) || (LLVM_GNUC_PREREQ(4, 3, 0) && !defined(__ICC))
43 #if defined(__llvm__) || (defined(__GNUC__) && !defined(__ICC))
4544 return __builtin_bswap32(value);
4645 #elif defined(_MSC_VER) && !defined(_DEBUG)
4746 return _byteswap_ulong(value);
5453 #endif
5554 }
5655
57 /// SwapByteOrder_64 - This function returns a byte-swapped representation of
58 /// the 64-bit argument.
56 /// This function returns a byte-swapped representation of the 64-bit argument.
5957 inline uint64_t SwapByteOrder_64(uint64_t value) {
60 #if defined(__llvm__) || (LLVM_GNUC_PREREQ(4, 3, 0) && !defined(__ICC))
58 #if defined(__llvm__) || (defined(__GNUC__) && !defined(__ICC))
6159 return __builtin_bswap64(value);
6260 #elif defined(_MSC_VER) && !defined(_DEBUG)
6361 return _byteswap_uint64(value);