xref: /aosp_15_r20/external/llvm/test/DebugInfo/PDB/pdbdump-write.test (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; This testcase checks to make sure that we can write PDB files.  It
2*9880d681SAndroid Build Coastguard Worker; works by first reading a known good PDB file and dumping the contents
3*9880d681SAndroid Build Coastguard Worker; to YAML.  Then it tries to reconstruct as much of the original PDB as
4*9880d681SAndroid Build Coastguard Worker; possible, although depending on what flags are specified when generating
5*9880d681SAndroid Build Coastguard Worker; the YAML, the PDB might be missing data required for any standard tool
6*9880d681SAndroid Build Coastguard Worker; to recognize it.  Finally, it dumps the same set of fields from the newly
7*9880d681SAndroid Build Coastguard Worker; constructed PDB to YAML, and verifies that the YAML is the same as the
8*9880d681SAndroid Build Coastguard Worker; original YAML generated from the good PDB.
9*9880d681SAndroid Build Coastguard Worker;
10*9880d681SAndroid Build Coastguard Worker; RUN: llvm-pdbdump pdb2yaml -stream-metadata -stream-directory -pdb-stream %p/Inputs/empty.pdb > %t.1
11*9880d681SAndroid Build Coastguard Worker; RUN: llvm-pdbdump yaml2pdb -pdb=%t.2 %t.1
12*9880d681SAndroid Build Coastguard Worker; RUN: llvm-pdbdump pdb2yaml -stream-metadata -stream-directory -pdb-stream %t.2 > %t.3
13*9880d681SAndroid Build Coastguard Worker; RUN: diff %t.1 %t.3
14