pdbdump: fix bug in name hash table.
name_ids() did not return all IDs but only the first NameCount items.
The number of non-zero entries in IDs vector is NameCount, but it
does not mean that all non-zero entries are at the beginning of IDs
vector.
Differential Revision: http://reviews.llvm.org/D20611
llvm-svn: 270656
diff --git a/llvm/lib/DebugInfo/PDB/Raw/NameHashTable.cpp b/llvm/lib/DebugInfo/PDB/Raw/NameHashTable.cpp
index 2ecb02d..2005c39 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/NameHashTable.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/NameHashTable.cpp
@@ -147,6 +147,4 @@
return IDs[0];
}
-ArrayRef<uint32_t> NameHashTable::name_ids() const {
- return ArrayRef<uint32_t>(IDs).slice(1, NameCount);
-}
+ArrayRef<uint32_t> NameHashTable::name_ids() const { return IDs; }