24 lines · plain
1; RUN: llvm-link %p/type-unique-dst-types.ll \2; RUN: %p/Inputs/type-unique-dst-types2.ll \3; RUN: %p/Inputs/type-unique-dst-types3.ll -S -o %t1.ll4; RUN: cat %t1.ll | FileCheck %s5 6; The types of @g1 and @g3 can be deduplicated, but @g2 should retain its7; opaque type, even if it has the same name as a type from a different module.8 9; CHECK: %A = type { %B }10; CHECK-NEXT: %B = type { i8 }11; CHECK-NEXT: %A.11 = type opaque12 13; CHECK: @g3 = external global %A14; CHECK: @g1 = external global %A15; CHECK: @g2 = external global %A.1116 17%A = type { %B }18%B = type { i8 }19@g3 = external global %A20 21define ptr @use_g3() {22 ret ptr @g323}24