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 6 7 ; Checks are not critical here - verifier will assert if we fail. 8 ; CHECK0: @funInternal2Alias = alias 9 ; CHECK0: @funExternal2Alias = alias 10 ; CHECK0: define internal i32 @funInternal2 11 ; CHECK0: define i32 @funExternal2 12 13 ; CHECK1: @funInternalAlias = alias 14 ; CHECK1: define internal i32 @funInternal 15 16 ; CHECK2: @funExternalAlias = alias 17 ; CHECK2: define i32 @funExternal 18 19 @funInternalAlias = alias i32 (), i32 ()* @funInternal 20 @funExternalAlias = alias i32 (), i32 ()* @funExternal 21 @funInternal2Alias = alias i32 (), i32 ()* @funInternal2 22 @funExternal2Alias = alias i32 (), i32 ()* @funExternal2 23 24 define internal i32 @funInternal() { 25 entry: 26 ret i32 0 27 } 28 29 define i32 @funExternal() { 30 entry: 31 %x = call i32 @funInternalAlias() 32 ret i32 %x 33 } 34 35 define internal i32 @funInternal2() { 36 entry: 37 %x = call i32 @funInternalAlias() 38 ret i32 %x 39 } 40 41 define i32 @funExternal2() { 42 entry: 43 %x = call i32 @funInternal2() 44 %y = call i32 @funExternalAlias() 45 %z = add nsw i32 %x, %y 46 ret i32 %z 47 } 48