LLVM API Documentation

Public Member Functions
llvm::StringTableBuilder Class Reference

Utility for building string tables with deduplicated suffixes. More...

#include <StringTableBuilder.h>

List of all members.

Public Member Functions

StringRef add (StringRef s)
 Add a string to the builder. Returns a StringRef to the internal copy of s. Can only be used before the table is finalized.
void finalize ()
 Analyze the strings and build the final table. No more strings can be added after this point.
StringRef data ()
 Retrieve the string table data. Can only be used after the table is finalized.
size_t getOffset (StringRef s)
 Get the offest of a string in the string table. Can only be used after the table is finalized.

Detailed Description

Utility for building string tables with deduplicated suffixes.

Definition at line 20 of file StringTableBuilder.h.


Member Function Documentation

Add a string to the builder. Returns a StringRef to the internal copy of s. Can only be used before the table is finalized.

Definition at line 27 of file StringTableBuilder.h.

References llvm::StringMapEntry< ValueTy >::getKey(), and llvm::StringMap< ValueTy, AllocatorTy >::GetOrCreateValue().

Retrieve the string table data. Can only be used after the table is finalized.

Definition at line 38 of file StringTableBuilder.h.

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

Definition at line 45 of file StringTableBuilder.h.

References llvm::StringMap< ValueTy, AllocatorTy >::count().


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