[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / debug-info-codeview-buildinfo.c
blob98d249be8c883d6a11265ce81552af29170cc27a
1 // REQUIRES: x86-registered-target
2 // RUN: %clang_cl --target=i686-windows-msvc /c /Z7 /Fo%t.obj -- %s
3 // RUN: llvm-pdbutil dump --types %t.obj | FileCheck %s
4 // RUN: %clang_cl -gcodeview-command-line --target=i686-windows-msvc /c /Z7 /Fo%t.obj -- %s
5 // RUN: llvm-pdbutil dump --types %t.obj | FileCheck %s
6 // RUN: %clang_cl --target=i686-windows-msvc /c /Z7 /Fo%t.obj -fdebug-compilation-dir=. -- %s
7 // RUN: llvm-pdbutil dump --types %t.obj | FileCheck %s --check-prefix RELATIVE
8 // RUN: %clang_cl -gno-codeview-command-line --target=i686-windows-msvc /c /Z7 /Fo%t.obj -- %s
9 // RUN: llvm-pdbutil dump --types %t.obj | FileCheck %s --check-prefix DISABLE
11 // -fmessage-length shouldn't be included in the command line since it breaks reproducibility
12 // RUN: %clang_cl -gcodeview-command-line --target=i686-windows-msvc -Xclang -fmessage-length=100 /c /Z7 /Fo%t.obj -- %s
13 // RUN: llvm-pdbutil dump --types %t.obj | FileCheck %s --check-prefix MESSAGELEN
15 int main(void) { return 42; }
17 // CHECK: Types (.debug$T)
18 // CHECK: ============================================================
19 // CHECK: 0x[[PWD:.+]] | LF_STRING_ID [size = {{.+}}] ID: <no type>, String: [[PWDVAL:.+]]
20 // CHECK: 0x[[FILEPATH:.+]] | LF_STRING_ID [size = {{.+}}] ID: <no type>, String: [[FILEPATHVAL:.+[\\/]debug-info-codeview-buildinfo.c]]
21 // CHECK: 0x[[ZIPDB:.+]] | LF_STRING_ID [size = {{.+}}] ID: <no type>, String:
22 // CHECK: 0x[[TOOL:.+]] | LF_STRING_ID [size = {{.+}}] ID: <no type>, String: [[TOOLVAL:.+[\\/][clang|llvm].*]]
23 // CHECK: 0x[[CMDLINE:.+]] | LF_STRING_ID [size = {{.+}}] ID: <no type>, String: "-cc1
24 // CHECK: 0x{{.+}} | LF_BUILDINFO [size = {{.+}}]
25 // CHECK-NEXT: 0x[[PWD]]: `[[PWDVAL]]`
26 // CHECK-NEXT: 0x[[TOOL]]: `[[TOOLVAL]]`
27 // CHECK-NEXT: 0x[[FILEPATH]]: `[[FILEPATHVAL]]`
28 // CHECK-NEXT: 0x[[ZIPDB]]: ``
29 // CHECK-NEXT: 0x[[CMDLINE]]: `"-cc1
31 // RELATIVE: Types (.debug$T)
32 // RELATIVE: ============================================================
33 // RELATIVE: 0x{{.+}} | LF_BUILDINFO [size = {{.+}}]
34 // RELATIVE: 0x{{.+}}: `.`
36 // DISABLE-NOT: "-cc1"
37 // DISABLE: 0x{{.+}} | LF_BUILDINFO [size = {{.+}}]
38 // DISABLE-NEXT: 0x{{.+}}: `{{.*}}`
39 // DISABLE-NEXT: 0x{{.+}}: `{{.*}}`
40 // DISABLE-NEXT: 0x{{.+}}: `{{.*}}`
41 // DISABLE-NEXT: 0x{{.+}}: ``
42 // DISABLE-NEXT: 0x{{.+}}: `{{.*}}`
44 // MESSAGELEN: Types (.debug$T)
45 // MESSAGELEN: ============================================================
46 // MESSAGELEN: 0x{{.+}} | LF_BUILDINFO [size = {{.+}}]
47 // MESSAGELEN-NOT: -fmessage-length