1 ; RUN: llvm-as %s -disable-verify -o %t.bc 2 ; RUN: llvm-lto -exported-symbol f -exported-symbol _f \ 3 ; RUN: -o %t.o %t.bc 2>&1 | \ 4 ; RUN: FileCheck %s -allow-empty -check-prefix=CHECK-WARN 5 ; RUN: llvm-nm %t.o | FileCheck %s 6 7 ; Check that missing debug locations on inlinable calls are a 8 ; recoverable error. 9 10 ; CHECK-WARN: warning{{.*}} ignoring invalid debug info 11 ; CHECK: {{f$}} 12 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" 13 target triple = "x86_64-apple-macosx" 14 15 define void @h() #0 !dbg !7 { 16 entry: 17 call void (...) @i(), !dbg !9 18 ret void, !dbg !10 19 } 20 21 declare void @i(...) #1 22 23 define void @g() #0 !dbg !11 { 24 entry: 25 ; Manually removed !dbg. 26 call void @h() 27 ret void, !dbg !13 28 } 29 30 define void @f() #0 !dbg !14 { 31 entry: 32 call void @g(), !dbg !15 33 ret void, !dbg !16 34 } 35 36 attributes #0 = { nounwind ssp uwtable } 37 38 !llvm.dbg.cu = !{!0} 39 !llvm.module.flags = !{!3, !4} 40 41 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, isOptimized: false, emissionKind: LineTablesOnly, enums: !2) 42 !1 = !DIFile(filename: "test.c", directory: "/") 43 !2 = !{} 44 !3 = !{i32 2, !"Dwarf Version", i32 2} 45 !4 = !{i32 2, !"Debug Info Version", i32 3} 46 !7 = distinct !DISubprogram(name: "h", scope: !1, file: !1, line: 2, type: !8, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, unit: !0, retainedNodes: !2) 47 !8 = !DISubroutineType(types: !2) 48 !9 = !DILocation(line: 2, column: 12, scope: !7) 49 !10 = !DILocation(line: 2, column: 17, scope: !7) 50 !11 = distinct !DISubprogram(name: "g", scope: !1, file: !1, line: 3, type: !8, isLocal: false, isDefinition: true, scopeLine: 3, isOptimized: false, unit: !0, retainedNodes: !2) 51 !12 = !DILocation(line: 3, column: 12, scope: !11) 52 !13 = !DILocation(line: 3, column: 17, scope: !11) 53 !14 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 4, type: !8, isLocal: false, isDefinition: true, scopeLine: 4, isOptimized: false, unit: !0, retainedNodes: !2) 54 !15 = !DILocation(line: 4, column: 12, scope: !14) 55 !16 = !DILocation(line: 4, column: 17, scope: !14) 56