|
| 1 | +; RUN: llc -mtriple riscv64-unknown-linux-gnu -filetype obj %s -o - | llvm-dwarfdump - | FileCheck %s -check-prefix CHECK-DWARF |
| 2 | +; RUN: llc -mtriple riscv64-unknown-linux-gnu -filetype obj %s -o - | llvm-readobj -r - | FileCheck %s -check-prefix CHECK-OBJ |
| 3 | + |
| 4 | +source_filename = "reduced.c" |
| 5 | +target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n64-S128" |
| 6 | +target triple = "riscv64-unknown-linux-gnu" |
| 7 | + |
| 8 | +define dso_local signext i32 @f() #0 !dbg !7 { |
| 9 | +entry: |
| 10 | + ret i32 32, !dbg !13 |
| 11 | +} |
| 12 | + |
| 13 | +attributes #0 = { noinline nounwind optnone "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+64bit" } |
| 14 | + |
| 15 | +!llvm.dbg.cu = !{!0} |
| 16 | +!llvm.module.flags = !{!2, !3, !4, !5} |
| 17 | +!llvm.ident = !{!6} |
| 18 | + |
| 19 | +!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 15.0.0", isOptimized: false, runtimeVersion: 0, splitDebugFilename: "reduced.dwo", emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None) |
| 20 | +!1 = !DIFile(filename: "reduced.c", directory: "/SourceCache") |
| 21 | +!2 = !{i32 2, !"Debug Info Version", i32 3} |
| 22 | +!3 = !{i32 1, !"wchar_size", i32 4} |
| 23 | +!4 = !{i32 1, !"target-abi", !"lp64"} |
| 24 | +!5 = !{i32 1, !"SmallDataLimit", i32 0} |
| 25 | +!6 = !{!"clang version 15.0.0"} |
| 26 | +!7 = distinct !DISubprogram(name: "f", scope: !8, file: !8, line: 2, type: !9, scopeLine: 2, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !12) |
| 27 | +!8 = !DIFile(filename: "/SourceCache/reduced.c", directory: "") |
| 28 | +!9 = !DISubroutineType(types: !10) |
| 29 | +!10 = !{!11} |
| 30 | +!11 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) |
| 31 | +!12 = !{} |
| 32 | +!13 = !DILocation(line: 2, column: 15, scope: !7) |
| 33 | + |
| 34 | +; CHECK-DWARF: 0x0000002a: DW_TAG_subprogram |
| 35 | +; CHECK-DWARF-NEXT: DW_AT_low_pc (0x0000000000000000) |
| 36 | +; CHECK-DWARF-NEXT: DW_AT_high_pc (0x0000000000000008) |
| 37 | + |
| 38 | +; CHECK-OBJ: Section (5) .rela.debug_info { |
| 39 | +; CHECK-OBJ: 0x1A R_RISCV_32 - 0x0 |
| 40 | +; CHECK-OBJ: 0x1E R_RISCV_64 - 0x0 |
| 41 | +; CHECK-OBJ: } |
0 commit comments