1 ; All of the functions in this module must end up 2 ; in the same partition. 3 4 ; RUN: llvm-split -j=2 -preserve-locals -o %t %s 5 ; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK1 %s 6 ; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK0 %s 7 8 ; CHECK0: declare i32 @funInternal0 9 ; CHECK0: declare i32 @funInternal1 10 ; CHECK0: declare i32 @funInternal2 11 ; CHECK0: declare i32 @funExternal 12 13 ; All functions are in the same file. 14 ; Local functions are still local. 15 ; CHECK1: define internal i32 @funInternal0 16 ; CHECK1: define internal i32 @funInternal1 17 ; CHECK1: define internal i32 @funInternal2 18 ; CHECK1: define i32 @funExternal 19 ; CHECK1: define i32 @funExternal2 20 21 define internal i32 @funInternal0() { 22 entry: 23 ret i32 0 24 } 25 26 define internal i32 @funInternal1() { 27 entry: 28 %x = call i32 @funInternal0() 29 ret i32 %x 30 } 31 32 define internal i32 @funInternal2() { 33 entry: 34 %x = call i32 @funInternal1() 35 ret i32 %x 36 } 37 38 define i32 @funExternal() { 39 entry: 40 %x = call i32 @funInternal2() 41 ret i32 %x 42 } 43 44 define i32 @funExternal2() { 45 entry: 46 %x = call i32 @funInternal0() 47 ret i32 %x 48 } 49