|
| 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 |
| 14 | + |
| 15 | +; Only llvm-lto2 adds the dso_local keyword, hence the {{.*}} |
| 16 | +; CHECK: define available_externally{{.*}} void @_ZN4CFVSD1Ev |
| 17 | + |
| 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 |
| 22 | + |
| 23 | +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" |
| 24 | +target triple = "x86_64-scei-ps4" |
| 25 | + |
| 26 | +%class.C = type <{ i32 (...)**, %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 } |
| 31 | + |
| 32 | +define void @_ZN1CD2Ev(%class.C* %this) unnamed_addr align 2 { |
| 33 | +entry: |
| 34 | + %this.addr = alloca %class.C*, align 8 |
| 35 | + %this1 = load %class.C*, %class.C** %this.addr, align 8 |
| 36 | + %m = getelementptr inbounds %class.C, %class.C* %this1, i32 0, i32 2 |
| 37 | + call void @_ZN4CFVSD1Ev(%struct.CFVS* %m), !dbg !50 |
| 38 | + call void @_ZN4CFVSD2Ev(%struct.CFVS* %m), !dbg !50 |
| 39 | + ret void |
| 40 | +} |
| 41 | + |
| 42 | +declare void @_ZN4CFVSD1Ev(%struct.CFVS*) unnamed_addr |
| 43 | +declare void @_ZN4CFVSD2Ev(%struct.CFVS*) unnamed_addr |
| 44 | + |
| 45 | +declare dereferenceable(1) %struct.S* @_Z3Getv() |
| 46 | + |
| 47 | +!llvm.dbg.cu = !{!0} |
| 48 | +!llvm.module.flags = !{!3, !4, !5, !6} |
| 49 | + |
| 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: ".") |
| 52 | +!2 = !{} |
| 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, variables: !2) |
| 58 | +!47 = !DISubroutineType(types: !48) |
| 59 | +!48 = !{!55} |
| 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) |
0 commit comments