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 21define internal i32 @funInternal0() { 22entry: 23 ret i32 0 24} 25 26define internal i32 @funInternal1() { 27entry: 28 %x = call i32 @funInternal0() 29 ret i32 %x 30} 31 32define internal i32 @funInternal2() { 33entry: 34 %x = call i32 @funInternal1() 35 ret i32 %x 36} 37 38define i32 @funExternal() { 39entry: 40 %x = call i32 @funInternal2() 41 ret i32 %x 42} 43 44define i32 @funExternal2() { 45entry: 46 %x = call i32 @funInternal0() 47 ret i32 %x 48} 49