summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-08-02 23:22:46 +0000
committerRui Ueyama <ruiu@google.com>2016-08-02 23:22:46 +0000
commit22e67387bf83a1364eed508ef899995ae3c78310 (patch)
tree0c95ca55e4283588d5d908f16685ad4648de0902 /llvm
parentd99f80b48e1f3502357e21d071531432be333b8e (diff)
downloadbcm5719-llvm-22e67387bf83a1364eed508ef899995ae3c78310.tar.gz
bcm5719-llvm-22e67387bf83a1364eed508ef899995ae3c78310.zip
pdbdump: Do not treat stream 0 pages as allocated pages.
I examined a few PDBs and all of them treated pages for stream 0 are unused, thus they were unmarked in their free page bitmap. I think we should do the same thing for compatibility. Differential Revision: https://reviews.llvm.org/D23047 llvm-svn: 277545
Diffstat (limited to 'llvm')
-rw-r--r--llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp b/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp
index 6c39044dbbd..3018a70d4c0 100644
--- a/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp
+++ b/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp
@@ -303,14 +303,16 @@ Error LLVMOutputStyle::dumpFreePageMap() {
recordKnownUsedPage(PS, File.getBlockMapIndex()); // Stream Table
- for (auto DB : File.getDirectoryBlockArray()) {
+ for (auto DB : File.getDirectoryBlockArray())
recordKnownUsedPage(PS, DB);
- }
- for (auto &SE : File.getStreamMap()) {
- for (auto &S : SE) {
+
+ // Record pages used by streams. Note that pages for stream 0
+ // are considered being unused because that's what MSVC tools do.
+ // Stream 0 doesn't contain actual data, so it makes some sense,
+ // though it's a bit confusing to us.
+ for (auto &SE : File.getStreamMap().drop_front(1))
+ for (auto &S : SE)
recordKnownUsedPage(PS, S);
- }
- }
dumpBitVector("Msf Free Pages", FPM);
dumpBitVector("Orphaned Pages", PS.OrphanedPages);
OpenPOWER on IntegriCloud