Skip to content

Commit 06cc888

Browse files
[Support] Make IsLittleEndianHost constexpr (NFC) (#153125)
IsLittleEndianHost is a compile-time constant because IsBigEndianHost also is.
1 parent 29ad073 commit 06cc888

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/Support/SwapByteOrder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace sys {
2626
constexpr bool IsBigEndianHost =
2727
llvm::endianness::native == llvm::endianness::big;
2828

29-
static const bool IsLittleEndianHost = !IsBigEndianHost;
29+
constexpr bool IsLittleEndianHost = !IsBigEndianHost;
3030

3131
inline unsigned char getSwappedBytes(unsigned char C) { return llvm::byteswap(C); }
3232
inline signed char getSwappedBytes( signed char C) { return llvm::byteswap(C); }

0 commit comments

Comments
 (0)