summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/DebugInfo/PDB/Raw/TpiStream.h1
-rw-r--r--llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp1
-rw-r--r--llvm/test/DebugInfo/PDB/pdbdump-headers.test2
-rw-r--r--llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp1
4 files changed, 5 insertions, 0 deletions
diff --git a/llvm/include/llvm/DebugInfo/PDB/Raw/TpiStream.h b/llvm/include/llvm/DebugInfo/PDB/Raw/TpiStream.h
index 0f15e400fff..d6765529371 100644
--- a/llvm/include/llvm/DebugInfo/PDB/Raw/TpiStream.h
+++ b/llvm/include/llvm/DebugInfo/PDB/Raw/TpiStream.h
@@ -44,6 +44,7 @@ public:
uint16_t getTypeHashStreamAuxIndex() const;
uint32_t getHashKeySize() const;
+ uint32_t NumHashBuckets() const;
codeview::FixedStreamArray<support::ulittle32_t> getHashValues() const;
codeview::FixedStreamArray<TypeIndexOffset> getTypeIndexOffsets() const;
codeview::FixedStreamArray<TypeIndexOffset> getHashAdjustments() const;
diff --git a/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp b/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp
index 20024563ee8..386f8ac80a5 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/TpiStream.cpp
@@ -153,6 +153,7 @@ uint16_t TpiStream::getTypeHashStreamAuxIndex() const {
return Header->HashAuxStreamIndex;
}
+uint32_t TpiStream::NumHashBuckets() const { return Header->NumHashBuckets; }
uint32_t TpiStream::getHashKeySize() const { return Header->HashKeySize; }
codeview::FixedStreamArray<support::ulittle32_t>
diff --git a/llvm/test/DebugInfo/PDB/pdbdump-headers.test b/llvm/test/DebugInfo/PDB/pdbdump-headers.test
index a839281c80a..2294da69182 100644
--- a/llvm/test/DebugInfo/PDB/pdbdump-headers.test
+++ b/llvm/test/DebugInfo/PDB/pdbdump-headers.test
@@ -142,6 +142,7 @@
; EMPTY-NEXT: )
; EMPTY-NEXT: }
; EMPTY: Hash {
+; EMPTY-NEXT: Number of Hash Buckets: 262143
; EMPTY-NEXT: Hash Key Size: 4
; EMPTY-NEXT: Values: [205956, 163561, 59811, 208239, 16377, 247078, 194342, 254156, 194536, 167492, 185421, 119540, 261871, 198119, 48056, 251486, 134580, 148190, 113636, 53336, 55779, 220695, 198114, 148734, 81128, 60158, 217249, 174209, 159978, 249504, 141941, 238785, 6214, 94935, 151449, 135589, 73373, 96512, 254299, 17744, 239514, 173189, 130544, 204437, 238560, 144673, 115151, 197306, 256035, 101096, 231280, 52156, 48854, 170035, 177041, 102745, 16947, 183703, 98548, 35693, 171328, 203640, 139292, 49018, 43821, 202555, 165040, 215835, 142625, 52534, 44186, 103930, 110942, 17991, 213215]
; EMPTY-NEXT: Type Index Offsets: [{4096, 0}]
@@ -224,6 +225,7 @@
; EMPTY-NEXT: )
; EMPTY-NEXT: }
; EMPTY: Hash {
+; EMPTY-NEXT: Number of Hash Buckets: 262143
; EMPTY-NEXT: Hash Key Size: 4
; EMPTY-NEXT: Values: [7186, 7198, 7180, 7191, 7201, 7241, 7249, 80727, 154177, 75189, 253662, 193467, 222705, 186099, 257108]
; EMPTY-NEXT: Type Index Offsets: [{4096, 0}]
diff --git a/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp b/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp
index b6438a90791..b287243d0c4 100644
--- a/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp
+++ b/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp
@@ -276,6 +276,7 @@ static void dumpTpiHash(ScopedPrinter &P, TpiStream &Tpi) {
if (!opts::DumpTpiHash)
return;
DictScope DD(P, "Hash");
+ P.printNumber("Number of Hash Buckets", Tpi.NumHashBuckets());
P.printNumber("Hash Key Size", Tpi.getHashKeySize());
codeview::FixedStreamArray<support::ulittle32_t> S = Tpi.getHashValues();
P.printList("Values", Tpi.getHashValues());
OpenPOWER on IntegriCloud