10 #ifndef LLVM_MC_STRINGTABLEBUILDER_H
11 #define LLVM_MC_STRINGTABLEBUILDER_H
28 assert(!isFinalized());
29 return StringIndexMap.
insert(std::make_pair(s, 0)).first->first();
45 assert(isFinalized());
52 assert(isFinalized());
53 assert(StringIndexMap.
count(s) &&
"String is not in table!");
54 return StringIndexMap[s];
61 return !StringTable.
empty();
void finalize(Kind kind)
Analyze the strings and build the final table.
size_type count(StringRef Key) const
count - Return 1 if the element is in the map, 0 otherwise.
Utility for building string tables with deduplicated suffixes.
bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const
StringRef add(StringRef s)
Add a string to the builder.
bool insert(MapEntryTy *KeyValue)
insert - Insert the specified key/value pair into the map.
size_t getOffset(StringRef s)
Get the offest of a string in the string table.
StringRef data()
Retrieve the string table data.
StringRef - Represent a constant reference to a string, i.e.