[llvm-pdbutil] Show what blocks a stream occupies.
This is useful when you want to look at a specific chunk of a
stream or look for discontinuities, and you need to know the
list of blocks occupied by a stream.
llvm-svn: 306150
diff --git a/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp b/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp
index a05e5cf..f76635f 100644
--- a/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp
+++ b/llvm/tools/llvm-pdbutil/DumpOutputStyle.cpp
@@ -199,6 +199,13 @@
"Stream {0}: [{1}] ({2} bytes)",
fmt_align(StreamIdx, AlignStyle::Right, NumDigits(StreamCount)),
StreamPurposes[StreamIdx], File.getStreamByteSize(StreamIdx));
+ if (opts::dump::DumpStreamBlocks) {
+ auto Blocks = File.getStreamBlockList(StreamIdx);
+ std::vector<uint32_t> BV(Blocks.begin(), Blocks.end());
+ P.formatLine(" {0} Blocks: [{1}]",
+ fmt_repeat(' ', NumDigits(StreamCount)),
+ make_range(BV.begin(), BV.end()));
+ }
}
return Error::success();