LLVM: llvm::gsym::FileWriter Class Reference (original) (raw)

A simplified binary data writer class that doesn't require targets, target definitions, architectures, or require any other optional compile time libraries to be enabled via the build process. More...

#include "[llvm/DebugInfo/GSYM/FileWriter.h](FileWriter%5F8h%5Fsource.html)"

Public Member Functions
FileWriter (llvm::raw_pwrite_stream &S, llvm::endianness B)
LLVM_ABI ~FileWriter ()
LLVM_ABI void writeU8 (uint8_t Value)
Write a single uint8_t value into the stream at the current file position.
LLVM_ABI void writeU16 (uint16_t Value)
Write a single uint16_t value into the stream at the current file position.
LLVM_ABI void writeU32 (uint32_t Value)
Write a single uint32_t value into the stream at the current file position.
LLVM_ABI void writeU64 (uint64_t Value)
Write a single uint64_t value into the stream at the current file position.
LLVM_ABI void writeSLEB (int64_t Value)
Write the value into the stream encoded using signed LEB128 at the current file position.
LLVM_ABI void writeULEB (uint64_t Value)
Write the value into the stream encoded using unsigned LEB128 at the current file position.
LLVM_ABI void writeData (llvm::ArrayRef< uint8_t > Data)
Write an array of uint8_t values into the stream at the current file position.
LLVM_ABI void writeNullTerminated (llvm::StringRef Str)
Write a NULL terminated C string into the stream at the current file position.
LLVM_ABI void fixup32 (uint32_t Value, uint64_t Offset)
Fixup a uint32_t value at the specified offset in the stream.
LLVM_ABI void alignTo (size_t Align)
Pad with zeroes at the current file position until the current file position matches the specified alignment.
LLVM_ABI uint64_t tell ()
Return the current offset within the file.
llvm::raw_pwrite_stream & get_stream ()
llvm::endianness getByteOrder () const

A simplified binary data writer class that doesn't require targets, target definitions, architectures, or require any other optional compile time libraries to be enabled via the build process.

This class needs the ability to seek to different spots in the binary stream that is produces to fixup offsets and sizes.

Definition at line 30 of file FileWriter.h.

~FileWriter()

FileWriter::~FileWriter ( )

alignTo()

void FileWriter::alignTo ( size_t Align )

fixup32()

get_stream()

getByteOrder()

tell()

writeData()

writeNullTerminated()

Write a NULL terminated C string into the stream at the current file position.

The entire contents of Str will be written into the steam at the current file position and then an extra NULL termation byte will be written. It is up to the user to ensure that Str doesn't contain any NULL characters unless the additional NULL characters are desired.

Parameters

Str The value to write into the stream.

Definition at line 62 of file FileWriter.cpp.

writeSLEB()

void FileWriter::writeSLEB ( int64_t Value )

writeU16()

void FileWriter::writeU16 ( uint16_t Value )

Write a single uint16_t value into the stream at the current file position.

The value will be byte swapped if needed to match the byte order specified during construction.

Parameters

Value The value to write into the stream.

Definition at line 37 of file FileWriter.cpp.

References llvm::support::endian::byte_swap().

writeU32()

void FileWriter::writeU32 ( uint32_t Value )

writeU64()

void FileWriter::writeU64 ( uint64_t Value )

Write a single uint64_t value into the stream at the current file position.

The value will be byte swapped if needed to match the byte order specified during construction.

Parameters

Value The value to write into the stream.

Definition at line 47 of file FileWriter.cpp.

References llvm::support::endian::byte_swap().

writeU8()

void FileWriter::writeU8 ( uint8_t Value )

writeULEB()

void FileWriter::writeULEB ( uint64_t Value )

The documentation for this class was generated from the following files: