1 ; RUN: llvm-as -disable-output <%s 2>&1 | FileCheck %s
6 !DILocalVariable(scope: !1),
9 ; CHECK-LABEL: invalid #dbg record DILocation
10 ; CHECK-NEXT: #dbg_value({{.*}})
14 !DILocalVariable(scope: !1),
17 ; CHECK-LABEL: invalid #dbg record DILocation
18 ; CHECK-NEXT: #dbg_declare({{.*}})
22 !DILocalVariable(scope: !1),
24 !DILocation(scope: !2))
25 ; CHECK-LABEL: mismatched subprogram between #dbg record variable and DILocation
26 ; CHECK-NEXT: #dbg_value({{[^,]+}}, ![[VAR:[0-9]+]], {{[^,]+}}, ![[LOC:[0-9]+]]
27 ; CHECK-NEXT: label %entry
28 ; CHECK-NEXT: ptr @foo
29 ; CHECK-NEXT: ![[VAR]] = !DILocalVariable({{.*}}scope: ![[VARSP:[0-9]+]]
30 ; CHECK-NEXT: ![[VARSP]] = distinct !DISubprogram(
31 ; CHECK-NEXT: ![[LOC]] = !DILocation({{.*}}scope: ![[LOCSP:[0-9]+]]
32 ; CHECK-NEXT: ![[LOCSP]] = distinct !DISubprogram(
36 !DILocalVariable(scope: !1),
38 !DILocation(scope: !2))
39 ; CHECK-LABEL: mismatched subprogram between #dbg record variable and DILocation
40 ; CHECK-NEXT: #dbg_declare({{[^,]+}}, ![[VAR:[0-9]+]], {{.*[^,]+}}, ![[LOC:[0-9]+]]
41 ; CHECK-NEXT: label %entry
42 ; CHECK-NEXT: ptr @foo
43 ; CHECK-NEXT: ![[VAR]] = !DILocalVariable({{.*}}scope: ![[VARSP:[0-9]+]]
44 ; CHECK-NEXT: ![[VARSP]] = distinct !DISubprogram(
45 ; CHECK-NEXT: ![[LOC]] = !DILocation({{.*}}scope: ![[LOCSP:[0-9]+]]
46 ; CHECK-NEXT: ![[LOCSP]] = distinct !DISubprogram(
52 !llvm.module.flags = !{!0}
53 !0 = !{i32 2, !"Debug Info Version", i32 3}
54 !1 = distinct !DISubprogram(name: "foo")
55 !2 = distinct !DISubprogram(name: "bar")