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
7 ; Check that missing debug locations on inlinable calls are a
10 ; CHECK-WARN: warning{{.*}} ignoring invalid debug info
12 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
13 target triple = "x86_64-apple-macosx"
15 define void @h() #0 !dbg !7 {
17 call void (...) @i(), !dbg !9
21 declare void @i(...) #1
23 define void @g() #0 !dbg !11 {
25 ; Manually removed !dbg.
30 define void @f() #0 !dbg !14 {
32 call void @g(), !dbg !15
36 attributes #0 = { nounwind ssp uwtable }
39 !llvm.module.flags = !{!3, !4}
41 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, isOptimized: false, emissionKind: LineTablesOnly, enums: !2)
42 !1 = !DIFile(filename: "test.c", directory: "/")
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)