15 #ifndef LLVM_SUPPORT_ENDIANSTREAM_H
16 #define LLVM_SUPPORT_ENDIANSTREAM_H
27 template <endianness endian>
struct Writer {
31 for (value_type V : Vals)
34 template <
typename value_type>
void write(value_type Val) {
35 Val = byte_swap<value_type, endian>(Val);
36 OS.
write((
const char *)&Val,
sizeof(value_type));
void write(value_type Val)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
uint32_t FloatToBits(float Float)
FloatToBits - This function takes a float and returns the bit equivalent 32-bit integer.
void write(ArrayRef< value_type > Vals)
raw_ostream & write(unsigned char C)
uint64_t DoubleToBits(double Double)
DoubleToBits - This function takes a double and returns the bit equivalent 64-bit integer...
void write(void *memory, value_type value)
Write a value to memory with a particular endianness.
Adapter to write values to a stream in a particular byte order.
This class implements an extremely fast bulk output stream that can only output to a stream...