43 lines · plain
1; RUN: llvm-as %s -disable-output 2>&1 | FileCheck %s2 3; CHECK: function declaration may only have a unique !dbg attachment4declare !dbg !4 void @f1()5 6; CHECK-NOT: function declaration may only have a unique !dbg attachment7declare !dbg !6 void @f5()8 9; CHECK: function must have a single !dbg attachment10define void @f2() !dbg !4 !dbg !4 {11 unreachable12}13 14; CHECK: DISubprogram attached to more than one function15define void @f3() !dbg !4 {16 unreachable17}18 19; CHECK: DISubprogram attached to more than one function20define void @f4() !dbg !4 {21 unreachable22}23 24; CHECK-NOT: !dbg25; CHECK: function !dbg attachment must be a subprogram26; CHECK-NEXT: ptr @bar27; CHECK-NEXT: !{{[0-9]+}} = !{}28define void @bar() !dbg !3 {29 unreachable30}31 32; CHECK: warning: ignoring invalid debug info33!llvm.module.flags = !{!0}34!0 = !{i32 2, !"Debug Info Version", i32 3}35 36!llvm.dbg.cu = !{!1}37!1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, retainedTypes: !5)38!2 = !DIFile(filename: "t.c", directory: "/path/to/dir")39!3 = !{}40!4 = distinct !DISubprogram(name: "foo", scope: !1, file: !2, unit: !1)41!5 = !{!6}42!6 = !DISubprogram(name: "f5", scope: !1, file: !2, unit: !1, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized)43