brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · c521a9b Raw
43 lines · plain
1; RUN: opt %s -o /dev/null -S 2>&1 | FileCheck %s2;3; The last dbg.declare intrinsic in this file has an illegal DILocation -- this4; needs to pass through the autoupgrade to #dbg_declare process and then get5; caught by the verifier.6;7; CHECK:      invalid #dbg record DILocation8; CHECK-NEXT: #dbg_declare(ptr %1, ![[VAR:[0-9]+]], !DIExpression(), ![[PROG:[0-9]+]])9; CHECK-NEXT: ![[PROG]] = distinct !DISubprogram(name: "IgnoreIntrinsicTest",10; CHECK-NEXT: label %011; CHECK-NEXT: ptr @IgnoreIntrinsicTest12 13declare void @llvm.dbg.declare(metadata, metadata, metadata)14 15define i32 @IgnoreIntrinsicTest() !dbg !10 {16  %1 = alloca i32, align 417  call void @llvm.dbg.declare(metadata ptr %1, metadata !14, metadata !DIExpression()), !dbg !1018  store volatile i32 1, ptr %1, align 419  %2 = load volatile i32, ptr %1, align 420  %3 = mul nsw i32 %2, 4221  ret i32 %322}23 24!llvm.dbg.cu = !{!0}25!llvm.module.flags = !{!8, !9}26 27!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 3.4 ", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !5, globals: !5, imports: !5)28!1 = !DIFile(filename: "<unknown>", directory: "/Users/matt/ryan_bug")29!2 = !{!3}30!3 = !DICompositeType(tag: DW_TAG_enumeration_type, scope: !4, file: !1, line: 20, size: 32, align: 32, elements: !6)31!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", file: !1, line: 19, size: 8, align: 8, elements: !5)32!5 = !{}33!6 = !{!7}34!7 = !DIEnumerator(name: "max_frame_size", value: 0)35!8 = !{i32 2, !"Dwarf Version", i32 2}36!9 = !{i32 1, !"Debug Info Version", i32 3}37!10 = distinct !DISubprogram(name: "IgnoreIntrinsicTest", linkageName: "IgnoreIntrinsicTest", scope: !1, file: !1, line: 1, type: !11, scopeLine: 1, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, retainedNodes: !5)38!11 = !DISubroutineType(types: !12)39!12 = !{!13}40!13 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)41!14 = !DILocalVariable(name: "x", scope: !10, file: !1, line: 2, type: !13)42!15 = !DILocation(line: 2, column: 16, scope: !10)43