14#ifndef LLVM_SUPPORT_SWAPBYTEORDER_H
15#define LLVM_SUPPORT_SWAPBYTEORDER_H
48 return llvm::bit_cast<float>(
llvm::byteswap(llvm::bit_cast<uint32_t>(
C)));
52 return llvm::bit_cast<double>(
llvm::byteswap(llvm::bit_cast<uint64_t>(
C)));
This file contains library features backported from future STL versions.
This file implements the C++20 <bit> header.
LLVM Value Representation.
@ C
The default llvm calling convention, compatible with C.
static const bool IsLittleEndianHost
unsigned char getSwappedBytes(unsigned char C)
constexpr bool IsBigEndianHost
void swapByteOrder(T &Value)
This is an optimization pass for GlobalISel generic memory operations.
constexpr T byteswap(T V) noexcept
Reverses the bytes in the given integer value V.
constexpr std::underlying_type_t< Enum > to_underlying(Enum E)
Returns underlying integer value of an enum.