summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-07-15 22:16:56 +0000
committerZachary Turner <zturner@google.com>2016-07-15 22:16:56 +0000
commitfaa554b2fd6c327cb9cc0ac9983bd3c178f2276c (patch)
tree7cb1be7bc7dfee1244fb8d6767036955aa276875 /llvm/test
parent93be6e8c0ada7f77b93db16c81b2160f82780ae6 (diff)
downloadbcm5719-llvm-faa554b2fd6c327cb9cc0ac9983bd3c178f2276c.tar.gz
bcm5719-llvm-faa554b2fd6c327cb9cc0ac9983bd3c178f2276c.zip
[pdb] Use MsfBuilder to handle the writing PDBs.
Previously we would read a PDB, then write some of it back out, but write the directory, super block, and other pertinent metadata back out unchanged. This generates incorrect PDBs since the amount of data written was not always the same as the amount of data read. This patch changes things to use the newly introduced `MsfBuilder` class to write out a correct and accurate set of Msf metadata for the data *actually* written, which opens up the door for adding and removing type records, symbol records, and other types of data to an existing PDB. llvm-svn: 275627
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/DebugInfo/PDB/pdbdump-headers.test3
-rw-r--r--llvm/test/DebugInfo/PDB/pdbdump-write.test10
-rw-r--r--llvm/test/DebugInfo/PDB/pdbdump-yaml.test1
3 files changed, 7 insertions, 7 deletions
diff --git a/llvm/test/DebugInfo/PDB/pdbdump-headers.test b/llvm/test/DebugInfo/PDB/pdbdump-headers.test
index 80914cbe61a..dabce470852 100644
--- a/llvm/test/DebugInfo/PDB/pdbdump-headers.test
+++ b/llvm/test/DebugInfo/PDB/pdbdump-headers.test
@@ -16,7 +16,6 @@
; EMPTY-NEXT: Unknown1: 0
; EMPTY-NEXT: BlockMapAddr: 24
; EMPTY-NEXT: NumDirectoryBlocks: 1
-; EMPTY-NEXT: BlockMapOffset: 98304
; EMPTY-NEXT: DirectoryBlocks: [23]
; EMPTY-NEXT: NumStreams: 17
; EMPTY-NEXT: }
@@ -952,7 +951,6 @@
; ALL: Unknown1: 0
; ALL: BlockMapAddr: 24
; ALL: NumDirectoryBlocks: 1
-; ALL: BlockMapOffset: 98304
; ALL: DirectoryBlocks: [23]
; ALL: NumStreams: 17
; ALL: }
@@ -1668,7 +1666,6 @@
; BIG-NEXT: Unknown1: 0
; BIG-NEXT: BlockMapAddr: 97
; BIG-NEXT: NumDirectoryBlocks: 1
-; BIG-NEXT: BlockMapOffset: 397312
; BIG-NEXT: DirectoryBlocks: [96]
; BIG-NEXT: NumStreams: 64
; BIG-NEXT: }
diff --git a/llvm/test/DebugInfo/PDB/pdbdump-write.test b/llvm/test/DebugInfo/PDB/pdbdump-write.test
index 0421ef1e3e6..09358932941 100644
--- a/llvm/test/DebugInfo/PDB/pdbdump-write.test
+++ b/llvm/test/DebugInfo/PDB/pdbdump-write.test
@@ -5,9 +5,13 @@
; the YAML, the PDB might be missing data required for any standard tool
; to recognize it. Finally, it dumps the same set of fields from the newly
; constructed PDB to YAML, and verifies that the YAML is the same as the
-; original YAML generated from the good PDB.
+; original YAML generated from the good PDB. Note that when doing the
+; final comparison it must dump the original and the new pdb without any
+; stream metadata, since the layout of the MSF file might be different
+; (for example if we don't write the entire stream)
;
; RUN: llvm-pdbdump pdb2yaml -stream-metadata -stream-directory -pdb-stream %p/Inputs/empty.pdb > %t.1
; RUN: llvm-pdbdump yaml2pdb -pdb=%t.2 %t.1
-; RUN: llvm-pdbdump pdb2yaml -stream-metadata -stream-directory -pdb-stream %t.2 > %t.3
-; RUN: diff %t.1 %t.3
+; RUN: llvm-pdbdump pdb2yaml -pdb-stream %p/Inputs/empty.pdb > %t.3
+; RUN: llvm-pdbdump pdb2yaml -pdb-stream %t.2 > %t.4
+; RUN: diff %t.3 %t.4
diff --git a/llvm/test/DebugInfo/PDB/pdbdump-yaml.test b/llvm/test/DebugInfo/PDB/pdbdump-yaml.test
index a7394beb8cc..e0029d83517 100644
--- a/llvm/test/DebugInfo/PDB/pdbdump-yaml.test
+++ b/llvm/test/DebugInfo/PDB/pdbdump-yaml.test
@@ -13,7 +13,6 @@
; YAML-NEXT: Unknown1: 0
; YAML-NEXT: BlockMapAddr: 24
; YAML-NEXT: NumDirectoryBlocks: 1
-; YAML-NEXT: BlockMapOffset: 98304
; YAML-NEXT: DirectoryBlocks:
; YAML-NEXT: - 23
; YAML-NEXT: NumStreams: 17
OpenPOWER on IntegriCloud