22 lines · plain
1# Test that we can write source file names to PDBs and read them back.2# Because the subsection the file names are stored in is 4-byte3# aligned, there is a possibility of misaligning the file names. This4# will cause them to be read back empty or truncated. To guard5# against this, we test with two different lengths of file name data6# that differ by one byte, so that at least one of those will only7# pass if alignment is implemented correctly.8 9RUN: rm -rf %t && mkdir -p %t10RUN: llvm-pdbutil yaml2pdb -pdb=%t/source-names-1.pdb %p/Inputs/source-names-1.yaml11RUN: llvm-pdbutil pdb2yaml -module-files %t/source-names-1.pdb \12RUN: | FileCheck -check-prefix=CHECK1 %s13RUN: llvm-pdbutil yaml2pdb -pdb=%t/source-names-2.pdb %p/Inputs/source-names-2.yaml14RUN: llvm-pdbutil pdb2yaml -module-files %t/source-names-2.pdb \15RUN: | FileCheck -check-prefix=CHECK2 %s16 17CHECK1: SourceFiles:18CHECK1: 'C:\src\test.c'19 20CHECK2: SourceFiles:21CHECK2: 'C:\src\test.cc'22