[Support] Use llvm::byteswap in SwapByteOrder.h (NFC)
This patch defines ByteSwap_{32,64} and getSwappedBytes with llvm::byteswap. It's tempting to define something like: template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>> inline T getSwappedBytes(T C) { return llvm::byteswap(C); } But this doesn't work. The host compiler would issue: error: call to 'getSwappedBytes' is ambiguous while compiling lldb/source/Utility/UUID.cpp.
Loading
Please sign in to comment