brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · ecaea6a Raw
49 lines · plain
1; All of the functions in this module must end up2; in the same partition without change of scope.3; RUN: llvm-split -j=2 -preserve-locals -o %t %s4; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK1 %s5; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK0 %s6 7; CHECK0: declare dso_local i32 @funInternal8; CHECK0: declare i32 @funExternal9; CHECK0: declare dso_local i32 @funInternal210; CHECK0: declare i32 @funExternal211 12; All functions are in the same file.13; Local functions are still local.14; CHECK1: define internal i32 @funInternal15; CHECK1: define i32 @funExternal16; CHECK1: define internal i32 @funInternal217; CHECK1: define i32 @funExternal218 19 20@funInternalAlias = internal alias i32 (), ptr @funInternal21 22define internal i32 @funInternal() {23entry:24  ret i32 025}26 27; Direct call to local alias28 29define i32 @funExternal() {30entry:31  %x = call i32 @funInternalAlias()32  ret i32 %x33}34 35; Call to local function that calls local alias36 37define internal i32 @funInternal2() {38entry:39  %x = call i32 @funInternalAlias()40  ret i32 %x41}42 43define i32 @funExternal2() {44entry:45  %x = call i32 @funInternal2()46  ret i32 %x47}48 49