Prologue support
[oota-llvm.git] / test / Linker / type-unique-src-type.ll
1 ; RUN: llvm-as %s -o %t.bc
2 ; RUN: llvm-link -S %t.bc -o - | FileCheck %s
3 ; RUN: llvm-link -S %s -o - | FileCheck %s
4
5 ; Test that we don't try to map %C.0 and C and then try to map %C to a new type.
6 ; This used to happen when lazy loading since we wouldn't then identify %C
7 ; as a destination type until it was too late.
8
9 ; CHECK: %C.0 = type { %B }
10 ; CHECK-NEXT: %B = type { %A }
11 ; CHECK-NEXT: %A = type { i8 }
12 ; CHECK-NEXT: %C = type { %B }
13
14 %A   = type { i8 }
15 %B   = type { %A }
16 %C   = type { %B }
17 %C.0 = type { %B }
18 define void @f1() {
19   getelementptr %C* null, i64 0, i32 0, i32 0
20   ret void
21 }
22 @g1 = external global %C.0