|
| 1 | +; REQUIRES: object-emission |
| 2 | +; RUN: %llc_dwarf %s -filetype=obj -o - | llvm-dwarfdump - | FileCheck %s |
| 3 | + |
| 4 | +; CHECK: {{.*}}DW_TAG_variable |
| 5 | +; CHECK-NEXT: {{.*}} DW_AT_const_value (1) |
| 6 | +; CHECK-NEXT: {{.*}} DW_AT_name ("arg") |
| 7 | + |
| 8 | +define void @test() !dbg !5 |
| 9 | +{ |
| 10 | +entry: |
| 11 | + call void @"llvm.dbg.value"(metadata i1 true, metadata !7, metadata !8), !dbg !6 |
| 12 | + ret void, !dbg !6 |
| 13 | +} |
| 14 | + |
| 15 | +declare void @"llvm.dbg.value"(metadata %".1", metadata %".2", metadata %".3") |
| 16 | + |
| 17 | +!llvm.dbg.cu = !{ !2 } |
| 18 | +!llvm.module.flags = !{ !9, !10 } |
| 19 | + |
| 20 | +!1 = !DIFile(directory: "", filename: "test") |
| 21 | +!2 = distinct !DICompileUnit(emissionKind: FullDebug, file: !1, isOptimized: false, language: DW_LANG_C_plus_plus, runtimeVersion: 0) |
| 22 | +!3 = !DIBasicType(encoding: DW_ATE_boolean, name: "bool", size: 8) |
| 23 | +!4 = !DISubroutineType(types: !{null}) |
| 24 | +!5 = distinct !DISubprogram(file: !1, isDefinition: true, isLocal: false, isOptimized: false, line: 5, linkageName: "test", name: "test", scope: !1, scopeLine: 5, type: !4, unit: !2) |
| 25 | +!6 = !DILocation(column: 1, line: 5, scope: !5) |
| 26 | +!7 = !DILocalVariable(arg: 0, file: !1, line: 5, name: "arg", scope: !5, type: !3) |
| 27 | +!8 = !DIExpression() |
| 28 | +!9 = !{ i32 2, !"Dwarf Version", i32 4 } |
| 29 | +!10 = !{ i32 2, !"Debug Info Version", i32 3 } |
0 commit comments