xref: /llvm-project/llvm/test/Verifier/dilocation-in-wrong-place.ll (revision 8dfe819bcd231486db3058e2538fff0f569e3c1a)
1; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
2
3; CHECK: DILocation not allowed within this metadata node
4; CHECK-NEXT: [[unknownMD:![0-9]+]] = distinct !{[[unknownMD]], [[dbgMD:![0-9]+]]}
5; CHECK-NEXT: [[dbgMD]] = !DILocation
6
7define void @f() !dbg !5 {
8  ret void, !dbg !10, !unknown_md !11
9}
10
11!llvm.dbg.cu = !{!0}
12!llvm.debugify = !{!3, !3}
13!llvm.module.flags = !{!4}
14
15!0 = distinct !DICompileUnit(language: DW_LANG_C, file: !1, producer: "debugify", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
16!1 = !DIFile(filename: "loop.ll", directory: "/")
17!2 = !{}
18!3 = !{i32 1}
19!4 = !{i32 2, !"Debug Info Version", i32 3}
20!5 = distinct !DISubprogram(name: "f", linkageName: "f", scope: null, file: !1, line: 1, type: !6, scopeLine: 1, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !7)
21!6 = !DISubroutineType(types: !2)
22!7 = !{!8}
23!8 = !DILocalVariable(name: "1", scope: !5, file: !1, line: 1, type: !9)
24!9 = !DIBasicType(name: "ty32", size: 32, encoding: DW_ATE_unsigned)
25!10 = !DILocation(line: 1, column: 1, scope: !5)
26!11 = !{!11, !10}
27