diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
commit | eb11fae6d08f479c0799db45860a98af528fa6e7 (patch) | |
tree | 44d492a50c8c1a7eb8e2d17ea3360ec4d066f042 /lib/DebugInfo/PDB/Native/PDBStringTable.cpp | |
parent | b8a2042aa938069e862750553db0e4d82d25822c (diff) |
Notes
Diffstat (limited to 'lib/DebugInfo/PDB/Native/PDBStringTable.cpp')
-rw-r--r-- | lib/DebugInfo/PDB/Native/PDBStringTable.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/DebugInfo/PDB/Native/PDBStringTable.cpp b/lib/DebugInfo/PDB/Native/PDBStringTable.cpp index f1c10357132b..afeea32043dd 100644 --- a/lib/DebugInfo/PDB/Native/PDBStringTable.cpp +++ b/lib/DebugInfo/PDB/Native/PDBStringTable.cpp @@ -122,7 +122,10 @@ Expected<uint32_t> PDBStringTable::getIDForString(StringRef Str) const { // we iterate the entire array. uint32_t Index = (Start + I) % Count; + // If we find 0, it means the item isn't in the hash table. uint32_t ID = IDs[Index]; + if (ID == 0) + return make_error<RawError>(raw_error_code::no_entry); auto ExpectedStr = getStringForID(ID); if (!ExpectedStr) return ExpectedStr.takeError(); |