1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
llvm-mirror/include
Reid Kleckner fcf92d4a71 Fix LLP64 detection in SwapByteOrder.h
MSVC does not define __LONG_MAX__, so we were just getting lucky in this
conditional:
  #if __LONG_MAX__ == __INT_MAX__

Undefined identifiers evaluate to zero in preprocessor conditionals, so
this became true, which happens to work for MSVC platforms.

Instead, use this pattern and let the compiler constant fold:
  return sizeof(long) == sizeof(int) ? SwapByteOrder_32((uint32_t)C)
                                     : SwapByteOrder_64((uint64_t)C);
2020-02-26 10:59:45 -08:00
..
llvm Fix LLP64 detection in SwapByteOrder.h 2020-02-26 10:59:45 -08:00
llvm-c [LLVM-C] Add bindings for addCoroutinePassesToExtensionPoints 2020-02-24 20:15:51 +01:00