xref: /llvm-project/llvm/test/Bitcode/DIExpression-aggresult.ll (revision 094572701dce4aaf36f4521d6cf750420d39f206)
1; RUN: llvm-dis -o - %s.bc | FileCheck %s
2; RUN: llvm-dis -o - %s.bc --load-bitcode-into-experimental-debuginfo-iterators=true | FileCheck %s
3%class.A = type { i32, i32, i32, i32 }
4
5define void @_Z3fooi(%class.A* sret(%class.A) %agg.result) #0 !dbg !3 {
6  ; CHECK: #dbg_declare({{.*}}, !DIExpression(),
7  call void @llvm.dbg.declare(metadata %class.A* %agg.result, metadata !13, metadata !16), !dbg !17
8  ret void, !dbg !17
9}
10
11declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
12
13attributes #0 = { ssp }
14attributes #1 = { nounwind readnone }
15
16!llvm.dbg.cu = !{!0}
17!llvm.module.flags = !{!2}
18
19!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
20!1 = !DIFile(filename: "a.cc", directory: "/tmp")
21!2 = !{i32 1, !"Debug Info Version", i32 3}
22!3 = distinct !DISubprogram(name: "foo", linkageName: "_Z3fooi", scope: !1, file: !1, line: 4, type: !4, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: false, unit: !0)
23!4 = !DISubroutineType(types: !5)
24!5 = !{!6}
25!6 = !DICompositeType(tag: DW_TAG_class_type, name: "A", scope: !0, file: !1, line: 2, size: 128, align: 32, elements: !7)
26!7 = !{!8, !10, !11, !12}
27!8 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !1, file: !1, line: 2, baseType: !9, size: 32, align: 32)
28!9 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
29!10 = !DIDerivedType(tag: DW_TAG_member, name: "y", scope: !1, file: !1, line: 2, baseType: !9, size: 32, align: 32, offset: 32)
30!11 = !DIDerivedType(tag: DW_TAG_member, name: "z", scope: !1, file: !1, line: 2, baseType: !9, size: 32, align: 32, offset: 64)
31!12 = !DIDerivedType(tag: DW_TAG_member, name: "o", scope: !1, file: !1, line: 2, baseType: !9, size: 32, align: 32, offset: 96)
32!13 = !DILocalVariable(name: "my_a", scope: !14, file: !1, line: 9, type: !15)
33!14 = distinct !DILexicalBlock(scope: !3, file: !1, line: 4, column: 14)
34!15 = !DIDerivedType(tag: DW_TAG_reference_type, file: !1, baseType: !6)
35!16 = !DIExpression(DW_OP_deref)
36!17 = !DILocation(line: 9, column: 5, scope: !3)
37