15 #ifndef LLVM_SUPPORT_ENDIANSTREAM_H
16 #define LLVM_SUPPORT_ENDIANSTREAM_H
26 template <endianness endian>
struct Writer {
29 template <
typename value_type>
void write(value_type Val) {
30 Val = byte_swap<value_type, endian>(Val);
31 OS.
write((
const char *)&Val,
sizeof(value_type));
void write(value_type Val)
uint32_t FloatToBits(float Float)
FloatToBits - This function takes a float and returns the bit equivalent 32-bit integer.
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...