1 ; All of the functions in this module must end up
2 ; in the same partition without change of scope.
3 ; RUN: llvm-split -j=2 -preserve-locals -o %t %s
4 ; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK1 %s
5 ; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK0 %s
7 ; CHECK0: declare dso_local i32 @funInternal
8 ; CHECK0: declare i32 @funExternal
9 ; CHECK0: declare dso_local i32 @funInternal2
10 ; CHECK0: declare i32 @funExternal2
12 ; All functions are in the same file.
13 ; Local functions are still local.
14 ; CHECK1: define internal i32 @funInternal
15 ; CHECK1: define i32 @funExternal
16 ; CHECK1: define internal i32 @funInternal2
17 ; CHECK1: define i32 @funExternal2
20 @funInternalAlias = internal alias i32 (), i32 ()* @funInternal
22 define internal i32 @funInternal() {
27 ; Direct call to local alias
29 define i32 @funExternal() {
31 %x = call i32 @funInternalAlias()
35 ; Call to local function that calls local alias
37 define internal i32 @funInternal2() {
39 %x = call i32 @funInternalAlias()
43 define i32 @funExternal2() {
45 %x = call i32 @funInternal2()