1 # RUN: yaml2obj %S/Inputs/pdb-file-statics-a.yaml -o %t.a.obj
2 # RUN: yaml2obj %S/Inputs/pdb-file-statics-b.yaml -o %t.b.obj
3 # RUN: lld-link %t.a.obj %t.b.obj /nodefaultlib /entry:main /debug /pdb:%t.pdb
4 # RUN: llvm-pdbutil dump -symbols %t.pdb | FileCheck %s
6 # S_FILESTATIC records are unique in that they refer to the string table, but
7 # they do *not* go through the file checksums table. They refer directly to
8 # the string table. This makes for special handling in the linker, so it
9 # deserves a custom test.
11 # Clang doesn't currently generate these records, but MSVC does, so we have to
12 # be able to correctly link them. These records are only generated when
13 # optimizations are turned on.
16 # // cl.exe /Z7 /O1 /c a.cpp
26 # int main(int argc, char **argv) {
32 # // cl.exe /Z7 /O1 /c a.cpp
43 # CHECK: ============================================================
44 # CHECK-LABEL: Mod 0000 | `{{.*}}a.obj`:
45 # CHECK: 232 | S_FILESTATIC [size = 16] `x`
46 # CHECK-NEXT: type = 0x0074 (int), file name = 2 (D:\src\llvmbuild\cl\Debug\x64\a.obj), flags = enreg global | enreg static
47 # CHECK: Mod 0001 | `{{.*}}b.obj`:
48 # CHECK: 232 | S_FILESTATIC [size = 16] `y`
49 # CHECK-NEXT: type = 0x0074 (int), file name = 74 (D:\src\llvmbuild\cl\Debug\x64\b.obj), flags = enreg global | enreg static
50 # CHECK-LABEL: Mod 0002 | `* Linker *`: