summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/CodeView/StringTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView/StringTable.cpp')
-rw-r--r--llvm/lib/DebugInfo/CodeView/StringTable.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/CodeView/StringTable.cpp b/llvm/lib/DebugInfo/CodeView/StringTable.cpp
index f496854ffaf..21f11204686 100644
--- a/llvm/lib/DebugInfo/CodeView/StringTable.cpp
+++ b/llvm/lib/DebugInfo/CodeView/StringTable.cpp
@@ -63,3 +63,9 @@ Error StringTable::commit(BinaryStreamWriter &Writer) const {
}
uint32_t StringTable::size() const { return Strings.size(); }
+
+uint32_t StringTable::getStringId(StringRef S) const {
+ auto P = Strings.find(S);
+ assert(P != Strings.end());
+ return P->second;
+}
OpenPOWER on IntegriCloud