|
| 1 | +;; This fixes https://github.com/llvm/llvm-project/issues/81555 |
| 2 | +; RUN: %llc_dwarf %s -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s |
| 3 | +; RUN: %llc_dwarf %s -filetype=obj -o - | llvm-dwarfdump - -verify | FileCheck %s --check-prefix=VERIFY |
| 4 | + |
| 5 | +; VERIFY-NOT: error: |
| 6 | + |
| 7 | +; CHECK: {{.*}}: DW_TAG_base_type |
| 8 | +; CHECK-NEXT: DW_AT_name ("var") |
| 9 | +; CHECK-NEXT: DW_AT_encoding (DW_ATE_signed_fixed) |
| 10 | +define void @func() !dbg !26 { |
| 11 | +entry: |
| 12 | + %classifier = alloca i32, align 4 |
| 13 | + tail call void @llvm.dbg.value(metadata i32 32768, metadata !37, metadata !DIExpression()), !dbg !39 |
| 14 | + store i32 32768, ptr %classifier, align 4, !dbg !39 |
| 15 | + ret void |
| 16 | +} |
| 17 | + |
| 18 | +declare void @llvm.dbg.value(metadata, metadata, metadata) |
| 19 | + |
| 20 | +!llvm.dbg.cu = !{!0} |
| 21 | +!llvm.module.flags = !{!19} |
| 22 | + |
| 23 | +!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !1, emissionKind: FullDebug) |
| 24 | +!1 = !DIFile(filename: "a", directory: "") |
| 25 | +!6 = !DIBasicType(name: "var", size: 32, encoding: DW_ATE_signed_fixed) |
| 26 | +!19 = !{i32 2, !"Debug Info Version", i32 3} |
| 27 | +!3 = !DISubroutineType(types: null) |
| 28 | +!26 = distinct !DISubprogram(unit: !0, type: !3) |
| 29 | +!37 = !DILocalVariable(name: "intercept", arg: 2, scope: !26, file: !1, line: 7, type: !6) |
| 30 | +!39 = !DILocation(line: 0, scope: !26) |
| 31 | + |
0 commit comments