|
| 1 | +; RUN: llc -filetype=obj -emit-func-debug-line-table-offsets < %s -o %t_yes_off.o |
| 2 | +; RUN: llc -filetype=obj < %s -o %t_no_off.o |
| 3 | +; RUN: llvm-dwarfdump -v -all %t_no_off.o | FileCheck --check-prefix=CHECK-NO-OFF %s |
| 4 | +; RUN: llvm-dwarfdump -v -all %t_yes_off.o | FileCheck --check-prefix=CHECK-YES-OFF %s |
| 5 | + |
| 6 | +; We don't need a line table for an empty function |
| 7 | +; CHECK-NO-OFF-NOT: DW_LNE_set_address |
| 8 | + |
| 9 | +; CHECK-YES-OFF: DW_AT_LLVM_stmt_sequence [DW_FORM_sec_offset] ({{.*}}) |
| 10 | +; CHECK-YES-OFF: Address |
| 11 | +; CHECK-YES-OFF-NEXT: ------------------ |
| 12 | +; CHECK-YES-OFF-NEXT: DW_LNE_set_address ({{.*}}) |
| 13 | +; CHECK-YES-OFF-NEXT: DW_LNE_end_sequence |
| 14 | +; CHECK-YES-OFF-NEXT: 0x0000000000000000 {{.*}} is_stmt end_sequence |
| 15 | + |
| 16 | +; IR generated by llvm-reduce from LTO repro |
| 17 | +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128" |
| 18 | +target triple = "x86_64-unknown-linux-gnu" |
| 19 | + |
| 20 | +define ptr @_my_test_function() !dbg !4 { |
| 21 | +entry: |
| 22 | + unreachable |
| 23 | +} |
| 24 | + |
| 25 | +!llvm.dbg.cu = !{!0} |
| 26 | +!llvm.module.flags = !{!3} |
| 27 | + |
| 28 | +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, producer: "clang version 21.0.0", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2, retainedTypes: !2, globals: !2, imports: !2, splitDebugInlining: false, nameTableKind: None) |
| 29 | +!1 = !DIFile(filename: "repro_bug.cpp", directory: "/tmp/repro", checksumkind: CSK_MD5, checksum: "74e33e88b3108a4f94403da9fdb362f5") |
| 30 | +!2 = !{} |
| 31 | +!3 = !{i32 2, !"Debug Info Version", i32 3} |
| 32 | +!4 = distinct !DISubprogram(name: "east", linkageName: "_my_test_function", scope: !6, file: !5, line: 114, type: !8, scopeLine: 114, flags: DIFlagPrototyped | DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !0, declaration: !9, retainedNodes: !2) |
| 33 | +!5 = !DIFile(filename: "repro_bug.cpp", directory: "/tmp/repro", checksumkind: CSK_MD5, checksum: "74e33e88b3108a4f94403da9fdb362f5") |
| 34 | +!6 = distinct !DICompositeType(tag: DW_TAG_class_type, name: "rectangle", file: !5, line: 103, size: 256, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !2, vtableHolder: !7) |
| 35 | +!7 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "shape", file: !5, line: 58, size: 128, flags: DIFlagTypePassByReference | DIFlagNonTrivial, elements: !2, vtableHolder: !7, identifier: "_ZTS5shape") |
| 36 | +!8 = distinct !DISubroutineType(types: !2) |
| 37 | +!9 = !DISubprogram(name: "east", linkageName: "_my_test_function", scope: !6, file: !5, line: 114, type: !8, scopeLine: 114, containingType: !6, virtualIndex: 2, flags: DIFlagPublic | DIFlagPrototyped, spFlags: DISPFlagVirtual | DISPFlagOptimized) |
0 commit comments