1 ; We should never separate alias from aliasee.
2 ; RUN: llvm-split -j=3 -preserve-locals -o %t %s
3 ; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK0 %s
4 ; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK1 %s
5 ; RUN: llvm-dis -o - %t2 | FileCheck --check-prefix=CHECK2 %s
7 ; Checks are not critical here - verifier will assert if we fail.
8 ; CHECK0: @g1 = global i32 99
9 ; CHECK0: @c1Alias = external global i8
10 ; CHECK0: @g1Alias = internal alias i8, bitcast (i32* @g1 to i8*)
12 ; CHECK1: @g1 = external global i32
13 ; CHECK1: @c1Alias = internal alias i8, inttoptr (i64 42 to i8*)
15 ; Third file is actually empty.
16 ; CHECK2: @g1 = external global i32
17 ; CHECK2: @g1Alias = external global i8
18 ; CHECK2: @c1Alias = external global i8
22 @g1Alias = internal alias i8, bitcast (i32* @g1 to i8*)
23 @c1Alias = internal alias i8, inttoptr (i64 42 to i8*)
24 @funExternalAlias = alias i8 (), i8 ()* @funExternal
26 define i8 @funExternal() {
28 %x = load i8, i8* @g1Alias
32 define i8 @funExternal2() {
34 %x = load i8, i8* @c1Alias
35 %y = call i8 @funExternalAlias()