xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/stack-protector-dbginfo.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=x86_64-apple-darwin < %s -o -
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; PR16954
4*9880d681SAndroid Build Coastguard Worker;
5*9880d681SAndroid Build Coastguard Worker; Make sure that when we splice off the end of a machine basic block, we include
6*9880d681SAndroid Build Coastguard Worker; DBG_VALUE MI in the terminator sequence.
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Worker@a = external global { i64, [56 x i8] }, align 32
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind sspreq
11*9880d681SAndroid Build Coastguard Workerdefine i32 @_Z18read_response_sizev() #0 !dbg !9 {
12*9880d681SAndroid Build Coastguard Workerentry:
13*9880d681SAndroid Build Coastguard Worker  tail call void @llvm.dbg.value(metadata !22, i64 0, metadata !23, metadata !DIExpression()), !dbg !39
14*9880d681SAndroid Build Coastguard Worker  %0 = load i64, i64* getelementptr inbounds ({ i64, [56 x i8] }, { i64, [56 x i8] }* @a, i32 0, i32 0), align 8, !dbg !40
15*9880d681SAndroid Build Coastguard Worker  tail call void @llvm.dbg.value(metadata i32 undef, i64 0, metadata !64, metadata !DIExpression()), !dbg !71
16*9880d681SAndroid Build Coastguard Worker  %1 = trunc i64 %0 to i32
17*9880d681SAndroid Build Coastguard Worker  ret i32 %1
18*9880d681SAndroid Build Coastguard Worker}
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind readnone
21*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.dbg.value(metadata, i64, metadata, metadata)
22*9880d681SAndroid Build Coastguard Worker
23*9880d681SAndroid Build Coastguard Workerattributes #0 = { sspreq }
24*9880d681SAndroid Build Coastguard Worker
25*9880d681SAndroid Build Coastguard Worker!llvm.dbg.cu = !{!0}
26*9880d681SAndroid Build Coastguard Worker!llvm.module.flags = !{!21, !72}
27*9880d681SAndroid Build Coastguard Worker
28*9880d681SAndroid Build Coastguard Worker!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, producer: "clang version 3.4 ", isOptimized: true, emissionKind: FullDebug, file: !1, enums: !2, retainedTypes: !5, globals: !20, imports: !5)
29*9880d681SAndroid Build Coastguard Worker!1 = !DIFile(filename: "<unknown>", directory: "/Users/matt/ryan_bug")
30*9880d681SAndroid Build Coastguard Worker!2 = !{!3}
31*9880d681SAndroid Build Coastguard Worker!3 = !DICompositeType(tag: DW_TAG_enumeration_type, line: 20, size: 32, align: 32, file: !1, scope: !4, elements: !6)
32*9880d681SAndroid Build Coastguard Worker!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "C", line: 19, size: 8, align: 8, file: !1, elements: !5)
33*9880d681SAndroid Build Coastguard Worker!5 = !{}
34*9880d681SAndroid Build Coastguard Worker!6 = !{!7}
35*9880d681SAndroid Build Coastguard Worker!7 = !DIEnumerator(name: "max_frame_size", value: 0) ; [ DW_TAG_enumerator ] [max_frame_size :: 0]
36*9880d681SAndroid Build Coastguard Worker!9 = distinct !DISubprogram(name: "read_response_size", linkageName: "_Z18read_response_sizev", line: 27, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 27, file: !1, scope: !10, type: !11, variables: !14)
37*9880d681SAndroid Build Coastguard Worker!10 = !DIFile(filename: "<unknown>", directory: "/Users/matt/ryan_bug")
38*9880d681SAndroid Build Coastguard Worker!11 = !DISubroutineType(types: !12)
39*9880d681SAndroid Build Coastguard Worker!12 = !{!13}
40*9880d681SAndroid Build Coastguard Worker!13 = !DIBasicType(tag: DW_TAG_base_type, name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
41*9880d681SAndroid Build Coastguard Worker!14 = !{!15, !19}
42*9880d681SAndroid Build Coastguard Worker!15 = !DILocalVariable(name: "b", line: 28, scope: !9, file: !10, type: !16)
43*9880d681SAndroid Build Coastguard Worker!16 = !DICompositeType(tag: DW_TAG_structure_type, name: "B", line: 16, size: 32, align: 32, file: !1, elements: !17)
44*9880d681SAndroid Build Coastguard Worker!17 = !{!18}
45*9880d681SAndroid Build Coastguard Worker!18 = !DIDerivedType(tag: DW_TAG_member, name: "end_of_file", line: 17, size: 32, align: 32, file: !1, scope: !16, baseType: !13)
46*9880d681SAndroid Build Coastguard Worker!19 = !DILocalVariable(name: "c", line: 29, scope: !9, file: !10, type: !13)
47*9880d681SAndroid Build Coastguard Worker!20 = !{}
48*9880d681SAndroid Build Coastguard Worker!21 = !{i32 2, !"Dwarf Version", i32 2}
49*9880d681SAndroid Build Coastguard Worker!22 = !{i64* getelementptr inbounds ({ i64, [56 x i8] }, { i64, [56 x i8] }* @a, i32 0, i32 0)}
50*9880d681SAndroid Build Coastguard Worker!23 = !DILocalVariable(name: "p2", line: 12, arg: 2, scope: !24, file: !10, type: !32)
51*9880d681SAndroid Build Coastguard Worker!24 = distinct !DISubprogram(name: "min<unsigned long long>", linkageName: "_ZN3__13minIyEERKT_S3_RS1_", line: 12, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 12, file: !1, scope: !25, type: !27, templateParams: !33, variables: !35)
52*9880d681SAndroid Build Coastguard Worker!25 = !DINamespace(name: "__1", line: 1, file: !26, scope: null)
53*9880d681SAndroid Build Coastguard Worker!26 = !DIFile(filename: "main.cpp", directory: "/Users/matt/ryan_bug")
54*9880d681SAndroid Build Coastguard Worker!27 = !DISubroutineType(types: !28)
55*9880d681SAndroid Build Coastguard Worker!28 = !{!29, !29, !32}
56*9880d681SAndroid Build Coastguard Worker!29 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !30)
57*9880d681SAndroid Build Coastguard Worker!30 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !31)
58*9880d681SAndroid Build Coastguard Worker!31 = !DIBasicType(tag: DW_TAG_base_type, name: "long long unsigned int", size: 64, align: 64, encoding: DW_ATE_unsigned)
59*9880d681SAndroid Build Coastguard Worker!32 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !31)
60*9880d681SAndroid Build Coastguard Worker!33 = !{!34}
61*9880d681SAndroid Build Coastguard Worker!34 = !DITemplateTypeParameter(name: "_Tp", type: !31)
62*9880d681SAndroid Build Coastguard Worker!35 = !{!36, !37}
63*9880d681SAndroid Build Coastguard Worker!36 = !DILocalVariable(name: "p1", line: 12, arg: 1, scope: !24, file: !10, type: !29)
64*9880d681SAndroid Build Coastguard Worker!37 = !DILocalVariable(name: "p2", line: 12, arg: 2, scope: !24, file: !10, type: !32)
65*9880d681SAndroid Build Coastguard Worker!38 = !DILocation(line: 33, scope: !9)
66*9880d681SAndroid Build Coastguard Worker!39 = !DILocation(line: 12, scope: !24, inlinedAt: !38)
67*9880d681SAndroid Build Coastguard Worker!40 = !DILocation(line: 9, scope: !41, inlinedAt: !59)
68*9880d681SAndroid Build Coastguard Worker!41 = distinct !DISubprogram(name: "min<unsigned long long, __1::A>", linkageName: "_ZN3__13minIyNS_1AEEERKT_S4_RS2_T0_", line: 7, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 8, file: !1, scope: !25, type: !42, templateParams: !53, variables: !55)
69*9880d681SAndroid Build Coastguard Worker!42 = !DISubroutineType(types: !43)
70*9880d681SAndroid Build Coastguard Worker!43 = !{!29, !29, !32, !44}
71*9880d681SAndroid Build Coastguard Worker!44 = !DICompositeType(tag: DW_TAG_structure_type, name: "A", size: 8, align: 8, file: !1, scope: !25, elements: !45)
72*9880d681SAndroid Build Coastguard Worker!45 = !{!46}
73*9880d681SAndroid Build Coastguard Worker!46 = !DISubprogram(name: "operator()", linkageName: "_ZN3__11AclERKiS2_", line: 1, isLocal: false, isDefinition: false, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, scopeLine: 1, file: !1, scope: !44, type: !47)
74*9880d681SAndroid Build Coastguard Worker!47 = !DISubroutineType(types: !48)
75*9880d681SAndroid Build Coastguard Worker!48 = !{!13, !49, !50, !50}
76*9880d681SAndroid Build Coastguard Worker!49 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, flags: DIFlagArtificial | DIFlagObjectPointer, baseType: !44)
77*9880d681SAndroid Build Coastguard Worker!50 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !51)
78*9880d681SAndroid Build Coastguard Worker!51 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !13)
79*9880d681SAndroid Build Coastguard Worker!53 = !{!34, !54}
80*9880d681SAndroid Build Coastguard Worker!54 = !DITemplateTypeParameter(name: "_Compare", type: !44)
81*9880d681SAndroid Build Coastguard Worker!55 = !{!56, !57, !58}
82*9880d681SAndroid Build Coastguard Worker!56 = !DILocalVariable(name: "p1", line: 7, arg: 1, scope: !41, file: !10, type: !29)
83*9880d681SAndroid Build Coastguard Worker!57 = !DILocalVariable(name: "p2", line: 7, arg: 2, scope: !41, file: !10, type: !32)
84*9880d681SAndroid Build Coastguard Worker!58 = !DILocalVariable(name: "p3", line: 8, arg: 3, scope: !41, file: !10, type: !44)
85*9880d681SAndroid Build Coastguard Worker!59 = !DILocation(line: 13, scope: !24, inlinedAt: !38)
86*9880d681SAndroid Build Coastguard Worker!63 = !{i32 undef}
87*9880d681SAndroid Build Coastguard Worker!64 = !DILocalVariable(name: "p1", line: 1, arg: 2, scope: !65, file: !10, type: !50)
88*9880d681SAndroid Build Coastguard Worker!65 = distinct !DISubprogram(name: "operator()", linkageName: "_ZN3__11AclERKiS2_", line: 1, isLocal: false, isDefinition: true, virtualIndex: 6, flags: DIFlagPrototyped, isOptimized: true, unit: !0, scopeLine: 2, file: !1, scope: !25, type: !47, declaration: !46, variables: !66)
89*9880d681SAndroid Build Coastguard Worker!66 = !{!67, !69, !70}
90*9880d681SAndroid Build Coastguard Worker!67 = !DILocalVariable(name: "this", arg: 1, flags: DIFlagArtificial | DIFlagObjectPointer, scope: !65, type: !68)
91*9880d681SAndroid Build Coastguard Worker!68 = !DIDerivedType(tag: DW_TAG_pointer_type, size: 64, align: 64, baseType: !44)
92*9880d681SAndroid Build Coastguard Worker!69 = !DILocalVariable(name: "p1", line: 1, arg: 2, scope: !65, file: !10, type: !50)
93*9880d681SAndroid Build Coastguard Worker!70 = !DILocalVariable(name: "", line: 2, arg: 3, scope: !65, file: !10, type: !50)
94*9880d681SAndroid Build Coastguard Worker!71 = !DILocation(line: 1, scope: !65, inlinedAt: !40)
95*9880d681SAndroid Build Coastguard Worker!72 = !{i32 1, !"Debug Info Version", i32 3}
96