summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/Native/StringTableBuilder.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-05-01 23:27:42 +0000
committerZachary Turner <zturner@google.com>2017-05-01 23:27:42 +0000
commit8a2ebfb1cdff1af0c3b670ac889d50e640cf4abb (patch)
tree29c8ec2121aa674d31c0ecf6c7fc238ceae2c001 /llvm/lib/DebugInfo/PDB/Native/StringTableBuilder.cpp
parent3bb6eb238e3f0bf571f96a6214eebfdf2d2dcf09 (diff)
downloadbcm5719-llvm-8a2ebfb1cdff1af0c3b670ac889d50e640cf4abb.tar.gz
bcm5719-llvm-8a2ebfb1cdff1af0c3b670ac889d50e640cf4abb.zip
[CodeView] Write CodeView line information.
Differential Revision: https://reviews.llvm.org/D32716 llvm-svn: 301882
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/StringTableBuilder.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Native/StringTableBuilder.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/StringTableBuilder.cpp b/llvm/lib/DebugInfo/PDB/Native/StringTableBuilder.cpp
index e0f8370ab60..40dc8e1bfcb 100644
--- a/llvm/lib/DebugInfo/PDB/Native/StringTableBuilder.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/StringTableBuilder.cpp
@@ -29,6 +29,12 @@ uint32_t StringTableBuilder::insert(StringRef S) {
return P.first->second;
}
+uint32_t StringTableBuilder::getStringIndex(StringRef S) {
+ auto Iter = Strings.find(S);
+ assert(Iter != Strings.end());
+ return Iter->second;
+}
+
static uint32_t computeBucketCount(uint32_t NumStrings) {
// The /names stream is basically an on-disk open-addressing hash table.
// Hash collisions are resolved by linear probing. We cannot make
OpenPOWER on IntegriCloud