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-byte 3 # aligned, there is a possibility of misaligning the file names. This 4 # will cause them to be read back empty or truncated. To guard 5 # against this, we test with two different lengths of file name data 6 # that differ by one byte, so that at least one of those will only 7 # pass if alignment is implemented correctly. 8 9 RUN: rm -rf %t && mkdir -p %t 10 RUN: llvm-pdbutil yaml2pdb -pdb=%t/source-names-1.pdb %p/Inputs/source-names-1.yaml 11 RUN: llvm-pdbutil pdb2yaml -module-files %t/source-names-1.pdb \ 12 RUN: | FileCheck -check-prefix=CHECK1 %s 13 RUN: llvm-pdbutil yaml2pdb -pdb=%t/source-names-2.pdb %p/Inputs/source-names-2.yaml 14 RUN: llvm-pdbutil pdb2yaml -module-files %t/source-names-2.pdb \ 15 RUN: | FileCheck -check-prefix=CHECK2 %s 16 17 CHECK1: SourceFiles: 18 CHECK1: 'C:\src\test.c' 19 20 CHECK2: SourceFiles: 21 CHECK2: 'C:\src\test.cc' 22