23 assert(Length <
sizeof(Bytes));
24 OS.
write(reinterpret_cast<const char *>(Bytes), Length);
30 assert(Length <
sizeof(Bytes));
31 OS.
write(reinterpret_cast<const char *>(Bytes), Length);
35 OS.
write(reinterpret_cast<const char *>(&U),
sizeof(U));
40 OS.
write(reinterpret_cast<const char *>(&Swapped),
sizeof(Swapped));
45 OS.
write(reinterpret_cast<const char *>(&Swapped),
sizeof(Swapped));
50 OS.
write(reinterpret_cast<const char *>(&Swapped),
sizeof(Swapped));
55 OS.
pwrite(reinterpret_cast<const char *>(&Swapped),
sizeof(Swapped),
60 OS.
write(reinterpret_cast<const char *>(Data.
data()), Data.
size());
73 off_t AlignedOffset = (Offset + Align - 1) / Align * Align;
74 if (AlignedOffset == Offset)
76 off_t PadCount = AlignedOffset -
Offset;
This class represents lattice values for constants.
void writeU8(uint8_t Value)
Write a single uint8_t value into the stream at the current file position.
void writeULEB(uint64_t Value)
Write the value into the stream encoded using unsigned LEB128 at the current file position...
raw_ostream & write_zeros(unsigned NumZeros)
write_zeros - Insert 'NumZeros' nulls.
void writeNullTerminated(llvm::StringRef Str)
Write a NULL terminated C string into the stream at the current file position.
void alignTo(size_t Align)
Pad with zeroes at the current file position until the current file position matches the specified al...
void fixup32(uint32_t Value, uint64_t Offset)
Fixup a uint32_t value at the specified offset in the stream.
void writeU32(uint32_t Value)
Write a single uint32_t value into the stream at the current file position.
void writeU64(uint64_t Value)
Write a single uint64_t value into the stream at the current file position.
void writeData(llvm::ArrayRef< uint8_t > Data)
Write an array of uint8_t values into the stream at the current file position.
void writeSLEB(int64_t Value)
Write the value into the stream encoded using signed LEB128 at the current file position.
size_t size() const
size - Get the array size.
void pwrite(const char *Ptr, size_t Size, uint64_t Offset)
This struct is a compact representation of a valid (non-zero power of two) alignment.
raw_ostream & write(unsigned char C)
unsigned encodeULEB128(uint64_t Value, raw_ostream &OS, unsigned PadTo=0)
Utility function to encode a ULEB128 value to an output stream.
unsigned encodeSLEB128(int64_t Value, raw_ostream &OS, unsigned PadTo=0)
Utility function to encode a SLEB128 value to an output stream.
uint64_t tell()
Return the current offset within the file.
value_type byte_swap(value_type value, endianness endian)
void writeU16(uint16_t Value)
Write a single uint16_t value into the stream at the current file position.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
uint64_t tell() const
tell - Return the current offset with the file.
StringRef - Represent a constant reference to a string, i.e.