llvm::gsym::FileWriter

A simplified binary data writer class.

Synopsis

Declared in <llvm/DebugInfo/GSYM/FileWriter.h>

class FileWriter;

Description

This class 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.

Member Functions

NameDescription
FileWriter [constructor]Construct a FileWriter that writes to the given stream.
~FileWriter [destructor]Destroy a FileWriter.
alignTo Pad with zeroes at the current file position until the current file position matches the specified alignment.
fixup32 Fixup a uint32_t value at the specified offset in the stream.
getByteOrder Return the byte order used by this writer.
getStringOffsetSize Get the string offset size for this writer.
get_stream Return a reference to the underlying output stream.
setStringOffsetSize Set the string offset size for this writer.
tell Return the current offset within the file.
writeData Write an array of uint8_t values into the stream at the current file position.
writeNullTerminated Write a NULL terminated C string into the stream at the current file position.
writeSLEB Write the value into the stream encoded using signed LEB128 at the current file position.
writeStringOffset Write a string table offset of StringOffsetSize bytes into the stream.
writeU16 Write a single uint16_t value into the stream at the current file position.
writeU32 Write a single uint32_t value into the stream at the current file position.
writeU64 Write a single uint64_t value into the stream at the current file position.
writeU8 Write a single uint8_t value into the stream at the current file position.
writeULEB Write the value into the stream encoded using unsigned LEB128 at the current file position.
writeUnsigned Write a single unsigned value into the stream at the current file position.