class StringTableBuilder

Declaration

class StringTableBuilder { /* full declaration omitted */ };

Description

Utility for building string tables with deduplicated suffixes.

Declared at: llvm/include/llvm/MC/StringTableBuilder.h:23

Method Overview

Methods

StringTableBuilder(
    llvm::StringTableBuilder::Kind K,
    unsigned int Alignment = 1)

Declared at: llvm/include/llvm/MC/StringTableBuilder.h:38

Parameters

llvm::StringTableBuilder::Kind K
unsigned int Alignment = 1

size_t add(llvm::CachedHashStringRef S)

Description

Add a string to the builder. Returns the position of S in the table. The position will be changed if finalize is used. Can only be used before the table is finalized.

Declared at: llvm/include/llvm/MC/StringTableBuilder.h:44

Parameters

llvm::CachedHashStringRef S

size_t add(llvm::StringRef S)

Declared at: llvm/include/llvm/MC/StringTableBuilder.h:45

Parameters

llvm::StringRef S

void clear()

Declared at: llvm/include/llvm/MC/StringTableBuilder.h:63

void finalize()

Description

Analyze the strings and build the final table. No more strings can be added after this point.

Declared at: llvm/include/llvm/MC/StringTableBuilder.h:49

void finalizeInOrder()

Description

Finalize the string table without reording it. In this mode, offsets returned by add will still be valid.

Declared at: llvm/include/llvm/MC/StringTableBuilder.h:53

size_t getOffset(
    llvm::CachedHashStringRef S) const

Description

Get the offest of a string in the string table. Can only be used after the table is finalized.

Declared at: llvm/include/llvm/MC/StringTableBuilder.h:57

Parameters

llvm::CachedHashStringRef S

size_t getOffset(llvm::StringRef S) const

Declared at: llvm/include/llvm/MC/StringTableBuilder.h:58

Parameters

llvm::StringRef S

size_t getSize() const

Declared at: llvm/include/llvm/MC/StringTableBuilder.h:62

void write(llvm::raw_ostream& OS) const

Declared at: llvm/include/llvm/MC/StringTableBuilder.h:65

Parameters

llvm::raw_ostream& OS

void write(uint8_t* Buf) const

Declared at: llvm/include/llvm/MC/StringTableBuilder.h:66

Parameters

uint8_t* Buf

~StringTableBuilder()

Declared at: llvm/include/llvm/MC/StringTableBuilder.h:39