blob: 6cc40dd2b9c6869ba1bb6a029678ffb358f8fefb [file] [edit]
; RUN: llvm-as -disable-output %s 2>&1 | FileCheck %s
; A !dbg location with atomGroup set whose scope is a cyclic DILexicalBlock
; chain that never reaches a DISubprogram.
; CHECK: DIScope scope chain must not contain a cycle
; CHECK: distinct !DILexicalBlock(scope: !{{[0-9]+}}
; CHECK: DIScope scope chain must not contain a cycle
; CHECK: distinct !DILexicalBlock(scope: !{{[0-9]+}}
; CHECK: DbgLoc uses atomGroup but DISubprogram doesn't have Key Instructions enabled
; CHECK: warning: ignoring invalid debug info
define void @f() !dbg !5 {
entry:
ret void, !dbg !11
}
!llvm.dbg.cu = !{!0}
!llvm.module.flags = !{!2, !3}
!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, emissionKind: FullDebug)
!1 = !DIFile(filename: "atomgroup-cycle.c", directory: "/")
!2 = !{i32 2, !"Dwarf Version", i32 5}
!3 = !{i32 2, !"Debug Info Version", i32 3}
!4 = !DISubroutineType(types: !6)
!5 = distinct !DISubprogram(name: "f", scope: !1, file: !1, line: 1, type: !4, scopeLine: 1, spFlags: DISPFlagDefinition, unit: !0)
!6 = !{null}
!9 = distinct !DILexicalBlock(scope: !10, file: !1, line: 2, column: 3)
!10 = distinct !DILexicalBlock(scope: !9, file: !1, line: 3, column: 5)
!11 = !DILocation(line: 2, column: 3, scope: !9, atomGroup: 1, atomRank: 1)