40 lines · plain
1# RUN: llc -mtriple=aarch64 -run-pass none -o - %s | FileCheck %s2 3# This test ensures that the MIR parser parses machine entry_value properties4# correctly.5 6--- |7 8 define void @foo(ptr swiftasync %arg) !dbg !4 {9 call void @llvm.dbg.declare(metadata ptr %arg, metadata !9, metadata !DIExpression(DW_OP_LLVM_entry_value, 1)), !dbg !1010 ret void11 }12 13 declare void @llvm.dbg.declare(metadata, metadata, metadata)14 !llvm.module.flags = !{!0, !1}15 !llvm.dbg.cu = !{!2}16 !0 = !{i32 7, !"Dwarf Version", i32 4}17 !1 = !{i32 2, !"Debug Info Version", i32 3}18 !2 = distinct !DICompileUnit(language: DW_LANG_Swift, file: !3, runtimeVersion: 0, emissionKind: FullDebug)19 !3 = !DIFile(filename: "blah", directory: "")20 !4 = distinct !DISubprogram(linkageName: "foo", scope: null, file: !3, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !6)21 !5 = !DISubroutineType(types: null)22 !6 = !{!7, !9}23 !7 = !DILocalVariable(name: "k1", scope: !4, file: !3, line: 7, type: !8)24 !8 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Klass")25 !9 = !DILocalVariable(name: "k2", scope: !4, file: !3, line: 7, type: !8)26 !10 = !DILocation(line: 6, scope: !4)27 28...29---30name: foo31entry_values:32 - { entry-value-register: '$x22', debug-info-variable: '!9', debug-info-expression: '!DIExpression(DW_OP_LLVM_entry_value, 1)',33 debug-info-location: '!10' }34# CHECK: entry_values:35# CHECK: - { entry-value-register: '$x22', debug-info-variable: '![[#]]', debug-info-expression: '!DIExpression(DW_OP_LLVM_entry_value, 1)',36# CHECK: debug-info-location: '![[#]]' }37body: |38 bb.1:39...40