brintos

brintos / llvm-project-archived public Read only

0
0
Text · 694 B · 601fab1 Raw
22 lines · plain
1; RUN: llvm-as -disable-output <%s 2>&1 | FileCheck %s2; CHECK: invalid #dbg record variable3; CHECK-NEXT: #dbg_declare({{.*}})4; CHECK-NEXT: DISubprogram5; CHECK: warning: ignoring invalid debug info6 7;; This test ensures we report an illegal variable as illegal, but also that8;; the illegal MDNode is printed out (DISubprogram) to help localise.9 10define void @foo(i32 %a) {11entry:12  %s = alloca i3213  call void @llvm.dbg.declare(metadata ptr %s, metadata !1, metadata !DIExpression()), !dbg !DILocation(scope: !1)14  ret void15}16 17declare void @llvm.dbg.declare(metadata, metadata, metadata)18 19!llvm.module.flags = !{!0}20!0 = !{i32 2, !"Debug Info Version", i32 3}21!1 = distinct !DISubprogram()22