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