return StringIndexMap.GetOrCreateValue(s, 0).getKey();
}
+ enum Kind {
+ ELF,
+ WinCOFF
+ };
+
/// \brief Analyze the strings and build the final table. No more strings can
/// be added after this point.
- void finalize();
+ void finalize(Kind kind);
/// \brief Retrieve the string table data. Can only be used after the table
/// is finalized.
return StringIndexMap[s];
}
+ void clear();
+
private:
bool isFinalized() {
return !StringTable.empty();