1 ; RUN: opt -module-summary -o %t1.bc %s
2 ; RUN: opt -module-summary -o %t2.bc %S/Inputs/dicompositetype-unique-alias.ll
3 ; RUN: llvm-lto --thinlto-action=run %t1.bc %t2.bc -thinlto-save-temps=%t3.
4 ; RUN: llvm-dis %t3.0.3.imported.bc -o - | FileCheck %s
5 ; RUN: llvm-lto2 run %t1.bc %t2.bc -o %t --save-temps \
6 ; RUN: -r %t1.bc,_ZN1CD2Ev,pl \
7 ; RUN: -r %t1.bc,_ZN4CFVSD1Ev,l \
8 ; RUN: -r %t1.bc,_ZN4CFVSD2Ev,l \
9 ; RUN: -r %t1.bc,_Z3Getv,l \
10 ; RUN: -r %t2.bc,_ZN4CFVSD1Ev,pl \
11 ; RUN: -r %t2.bc,_ZN4CFVSD2Ev,pl \
12 ; RUN: -r %t2.bc,_Z3Getv,l
13 ; RUN: llvm-dis %t.1.3.import.bc -o - | FileCheck %s
15 ; Only llvm-lto2 adds the dso_local keyword, hence the {{.*}}
16 ; CHECK: define available_externally{{.*}} void @_ZN4CFVSD1Ev
18 ; Confirm that we only have a single DICompositeType after importing
19 ; both an alias and its aliasee, since ODR Type Uniquing is enabled.
20 ; CHECK: DICompositeType
21 ; CHECK-NOT: DICompositeType
23 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
24 target triple = "x86_64-scei-ps4"
26 %class.C = type <{ ptr, %class.A, %struct.CFVS, [6 x i8] }>
27 %class.A = type { %struct.Vec }
28 %struct.Vec = type { i8 }
29 %struct.CFVS = type { %struct.Vec }
30 %struct.S = type { i8 }
32 define void @_ZN1CD2Ev(ptr %this) unnamed_addr align 2 {
34 %this.addr = alloca ptr, align 8
35 %this1 = load ptr, ptr %this.addr, align 8
36 %m = getelementptr inbounds %class.C, ptr %this1, i32 0, i32 2
37 call void @_ZN4CFVSD1Ev(ptr %m), !dbg !50
38 call void @_ZN4CFVSD2Ev(ptr %m), !dbg !50
42 declare void @_ZN4CFVSD1Ev(ptr) unnamed_addr
43 declare void @_ZN4CFVSD2Ev(ptr) unnamed_addr
45 declare dereferenceable(1) ptr @_Z3Getv()
48 !llvm.module.flags = !{!3, !4, !5, !6}
50 !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 6.0.0 (trunk 321360) (llvm/trunk 321359)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
51 !1 = !DIFile(filename: "bz188598-a.cpp", directory: ".")
53 !3 = !{i32 2, !"Dwarf Version", i32 4}
54 !4 = !{i32 2, !"Debug Info Version", i32 3}
55 !5 = !{i32 1, !"wchar_size", i32 2}
56 !6 = !{i32 7, !"PIC Level", i32 2}
57 !8 = distinct !DISubprogram(name: "~C", linkageName: "_ZN1CD2Ev", scope: !1, file: !1, line: 9, type: !47, isLocal: false, isDefinition: true, scopeLine: 9, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
58 !47 = !DISubroutineType(types: !48)
60 !50 = !DILocation(line: 9, scope: !51)
61 !51 = distinct !DILexicalBlock(scope: !8, file: !1, line: 9)
62 !55 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)