brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 226b6ca Raw
48 lines · plain
1;; Tests that we can parse and print a function containing a debug label record2;; and no other debug record kinds. llvm-as should autoupgrade the intrinsic3;; below into a debug record, that then round-trips through opt.4 5; RUN: llvm-as %s -o - \6; RUN: | opt -S \7; RUN: | FileCheck %s8 9source_filename = "bbi-94196.c"10target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"11target triple = "x86_64-unknown-linux-gnu"12 13; CHECK-LABEL: void @foo()14; CHECK: bar:15; CHECK-NEXT: #dbg_label(![[LABEL:[0-9]+]], ![[LOC:[0-9]+]])16 17; CHECK-DAG: ![[LABEL]] = !DILabel({{.*}}name: "bar"18; CHECK-DAG: ![[LOC]] = !DILocation(line: 5, column: 119 20define dso_local void @foo() !dbg !5 {21entry:22  br label %bar, !dbg !923 24bar:                                              ; preds = %entry25  tail call void @llvm.dbg.label(metadata !10), !dbg !1126  ret void, !dbg !1227}28 29declare void @llvm.dbg.label(metadata)30 31!llvm.dbg.cu = !{!0}32!llvm.module.flags = !{!2, !3}33!llvm.ident = !{!4}34 35!0 = distinct !DICompileUnit(language: DW_LANG_C11, file: !1, producer: "clang version 19.0.0git", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)36!1 = !DIFile(filename: "<stdin>", directory: "/home/gbtozers/dev/llvm-project-ddd-textual-ir")37!2 = !{i32 2, !"Debug Info Version", i32 3}38!3 = !{i32 1, !"wchar_size", i32 4}39!4 = !{!"clang version 19.0.0git"}40!5 = distinct !DISubprogram(name: "foo", scope: !6, file: !6, line: 1, type: !7, scopeLine: 2, spFlags: DISPFlagDefinition, unit: !0)41!6 = !DIFile(filename: "bbi-94196.c", directory: "/home/gbtozers/dev/llvm-project-ddd-textual-ir")42!7 = !DISubroutineType(types: !8)43!8 = !{null}44!9 = !DILocation(line: 3, column: 3, scope: !5)45!10 = !DILabel(scope: !5, name: "bar", file: !6, line: 5)46!11 = !DILocation(line: 5, column: 1, scope: !5)47!12 = !DILocation(line: 6, column: 3, scope: !5)48