2017-10-02 18:31:29 +00:00
|
|
|
; RUN: llvm-as -disable-output < %s -o /dev/null 2>&1 | FileCheck %s
|
2015-12-06 23:05:38 +00:00
|
|
|
|
|
|
|
define i32 @foo() !dbg !4 {
|
|
|
|
entry:
|
|
|
|
ret i32 0, !dbg !6
|
|
|
|
}
|
|
|
|
|
|
|
|
define i32 @bar() !dbg !5 {
|
|
|
|
entry:
|
|
|
|
; CHECK: !dbg attachment points at wrong subprogram for function
|
|
|
|
ret i32 0, !dbg !6
|
|
|
|
}
|
|
|
|
|
2017-10-02 18:31:29 +00:00
|
|
|
; CHECK: warning: ignoring invalid debug info
|
2015-12-06 23:05:38 +00:00
|
|
|
!llvm.dbg.cu = !{!0}
|
|
|
|
!llvm.module.flags = !{!7, !8}
|
|
|
|
|
2016-04-15 15:57:41 +00:00
|
|
|
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2)
|
2015-12-06 23:05:38 +00:00
|
|
|
!1 = !DIFile(filename: "dwarf-test.c", directory: "test")
|
|
|
|
!2 = !{}
|
2016-04-15 15:57:41 +00:00
|
|
|
!4 = distinct !DISubprogram(name: "foo", scope: !0, isDefinition: true, unit: !0)
|
|
|
|
!5 = distinct !DISubprogram(name: "bar", scope: !0, isDefinition: true, unit: !0)
|
2015-12-06 23:05:38 +00:00
|
|
|
!6 = !DILocation(line: 7, scope: !4)
|
|
|
|
!7 = !{i32 2, !"Dwarf Version", i32 3}
|
|
|
|
!8 = !{i32 1, !"Debug Info Version", i32 3}
|