LLVM 17.0.0git
Namespaces | Functions | Variables
SwapByteOrder.h File Reference
#include "llvm/ADT/bit.h"
#include <cstddef>
#include <cstdint>
#include <type_traits>
#include <machine/endian.h>

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
namespace  llvm::sys
 

Functions

uint16_t llvm::ByteSwap_16 (uint16_t value)
 ByteSwap_16 - This function returns a byte-swapped representation of the 16-bit argument.
 
uint32_t llvm::ByteSwap_32 (uint32_t value)
 This function returns a byte-swapped representation of the 32-bit argument.
 
uint64_t llvm::ByteSwap_64 (uint64_t value)
 This function returns a byte-swapped representation of the 64-bit argument.
 
unsigned char llvm::sys::getSwappedBytes (unsigned char C)
 
signed char llvm::sys::getSwappedBytes (signed char C)
 
char llvm::sys::getSwappedBytes (char C)
 
unsigned short llvm::sys::getSwappedBytes (unsigned short C)
 
signed short llvm::sys::getSwappedBytes (signed short C)
 
unsigned int llvm::sys::getSwappedBytes (unsigned int C)
 
signed int llvm::sys::getSwappedBytes (signed int C)
 
unsigned long llvm::sys::getSwappedBytes (unsigned long C)
 
signed long llvm::sys::getSwappedBytes (signed long C)
 
unsigned long long llvm::sys::getSwappedBytes (unsigned long long C)
 
signed long long llvm::sys::getSwappedBytes (signed long long C)
 
float llvm::sys::getSwappedBytes (float C)
 
double llvm::sys::getSwappedBytes (double C)
 
template<typename T >
std::enable_if_t< std::is_enum_v< T >, Tllvm::sys::getSwappedBytes (T C)
 
template<typename T >
void llvm::sys::swapByteOrder (T &Value)
 

Variables

constexpr bool llvm::sys::IsBigEndianHost = false
 
static const bool llvm::sys::IsLittleEndianHost = !IsBigEndianHost