xref: /aosp_15_r20/external/llvm/test/DebugInfo/COFF/inlining-same-name.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=x86_64-windows-msvc < %s -filetype=obj -o - | llvm-readobj - -codeview | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; We should only get one func id record, and both inlinees should point to it,
4*9880d681SAndroid Build Coastguard Worker; even though there are two DISubprograms.
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker; CHECK:  FuncId (0x1002) {
7*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:    TypeLeafKind: LF_FUNC_ID (0x1601)
8*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:    ParentScope: 0x0
9*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:    FunctionType: void () (0x1001)
10*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:    Name: same_name
11*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT:  }
12*9880d681SAndroid Build Coastguard Worker; CHECK-NOT:    Name: same_name
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker; CHECK: CodeViewDebugInfo [
15*9880d681SAndroid Build Coastguard Worker; CHECK:   Section: .debug$S
16*9880d681SAndroid Build Coastguard Worker; CHECK:   Subsection [
17*9880d681SAndroid Build Coastguard Worker; CHECK:     ProcStart {
18*9880d681SAndroid Build Coastguard Worker; CHECK:       DisplayName: main
19*9880d681SAndroid Build Coastguard Worker; CHECK:     }
20*9880d681SAndroid Build Coastguard Worker; CHECK:     InlineSite {
21*9880d681SAndroid Build Coastguard Worker; CHECK:       Inlinee: same_name (0x1002)
22*9880d681SAndroid Build Coastguard Worker; CHECK:     }
23*9880d681SAndroid Build Coastguard Worker; CHECK:     InlineSiteEnd {
24*9880d681SAndroid Build Coastguard Worker; CHECK:     }
25*9880d681SAndroid Build Coastguard Worker; CHECK:     InlineSite {
26*9880d681SAndroid Build Coastguard Worker; CHECK:       Inlinee: same_name (0x1002)
27*9880d681SAndroid Build Coastguard Worker; CHECK:     }
28*9880d681SAndroid Build Coastguard Worker; CHECK:     InlineSiteEnd {
29*9880d681SAndroid Build Coastguard Worker; CHECK:     }
30*9880d681SAndroid Build Coastguard Worker; CHECK:     ProcEnd
31*9880d681SAndroid Build Coastguard Worker; CHECK:   ]
32*9880d681SAndroid Build Coastguard Worker
33*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
34*9880d681SAndroid Build Coastguard Workertarget triple = "x86_64-pc-windows-msvc"
35*9880d681SAndroid Build Coastguard Worker
36*9880d681SAndroid Build Coastguard Workerdefine void @main(i32* %i.i) {
37*9880d681SAndroid Build Coastguard Worker  store volatile i32 3, i32* %i.i, !dbg !6
38*9880d681SAndroid Build Coastguard Worker  store volatile i32 3, i32* %i.i, !dbg !19
39*9880d681SAndroid Build Coastguard Worker  ret void
40*9880d681SAndroid Build Coastguard Worker}
41*9880d681SAndroid Build Coastguard Worker
42*9880d681SAndroid Build Coastguard Worker!llvm.module.flags = !{!0, !1, !2}
43*9880d681SAndroid Build Coastguard Worker!llvm.dbg.cu = !{!4}
44*9880d681SAndroid Build Coastguard Worker
45*9880d681SAndroid Build Coastguard Worker!0 = !{i32 2, !"CodeView", i32 1}
46*9880d681SAndroid Build Coastguard Worker!1 = !{i32 2, !"Debug Info Version", i32 3}
47*9880d681SAndroid Build Coastguard Worker!2 = !{i32 6, !"Linker Options", !{}}
48*9880d681SAndroid Build Coastguard Worker!4 = distinct !DICompileUnit(language: DW_LANG_D, file: !5, producer: "LDC (http://wiki.dlang.org/LDC)", isOptimized: false, runtimeVersion: 1, emissionKind: FullDebug)
49*9880d681SAndroid Build Coastguard Worker!5 = !DIFile(filename: "opover2.d", directory: "C:\5CLDC\5Cninja-ldc\5C..\5Cldc\5Ctests\5Cd2\5Cdmd-testsuite\5Crunnable")
50*9880d681SAndroid Build Coastguard Worker!6 = !DILocation(line: 302, column: 9, scope: !7, inlinedAt: !15)
51*9880d681SAndroid Build Coastguard Worker!7 = distinct !DISubprogram(name: "same_name", linkageName: "same_name", scope: null, file: !5, line: 302, type: !8, isLocal: false, isDefinition: true, scopeLine: 302, flags: DIFlagPrototyped, isOptimized: false, unit: !4, variables: !{})
52*9880d681SAndroid Build Coastguard Worker!8 = !DISubroutineType(types: !{})
53*9880d681SAndroid Build Coastguard Worker!15 = distinct !DILocation(line: 333, column: 5, scope: !16)
54*9880d681SAndroid Build Coastguard Worker!16 = distinct !DISubprogram(name: "main", linkageName: "main", scope: null, file: !5, line: 328, type: !8, isLocal: false, isDefinition: true, scopeLine: 328, flags: DIFlagPrototyped, isOptimized: false, unit: !4, variables: !{})
55*9880d681SAndroid Build Coastguard Worker!19 = !DILocation(line: 308, column: 9, scope: !20, inlinedAt: !25)
56*9880d681SAndroid Build Coastguard Worker!20 = distinct !DISubprogram(name: "same_name", linkageName: "same_name",  scope: null, file: !5, line: 308, type: !8, isLocal: false, isDefinition: true, scopeLine: 308, flags: DIFlagPrototyped, isOptimized: false, unit: !4, variables: !{})
57*9880d681SAndroid Build Coastguard Worker!25 = distinct !DILocation(line: 334, column: 5, scope: !16)
58