1; Test that blockaddress target is in the same partition.
2; RUN: llvm-split -j5 -o %t %s
3; RUN: llvm-dis -o - %t0 | FileCheck --check-prefix=CHECK0 %s
4; RUN: llvm-dis -o - %t1 | FileCheck --check-prefix=CHECK1234 %s
5; RUN: llvm-dis -o - %t2 | FileCheck --check-prefix=CHECK1234 %s
6; RUN: llvm-dis -o - %t3 | FileCheck --check-prefix=CHECK1234 %s
7; RUN: llvm-dis -o - %t4 | FileCheck --check-prefix=CHECK1234 %s
8
9; CHECK0:    @xxx = global [2 x i8*] [i8* blockaddress(@f, %exit), i8* blockaddress(@g, %exit)]
10; CHECK1234: @xxx = external global [2 x i8*]
11; CHECK1234-NOT: blockaddress
12@xxx = global [2 x i8*] [i8* blockaddress(@f, %exit), i8* blockaddress(@g, %exit)]
13
14; CHECK0:    define i32 @f()
15; CHECK1234: declare i32 @f()
16define i32 @f(){
17entry:
18  br label %exit
19exit:
20  ret i32 0
21}
22
23; CHECK0:    define i32 @g()
24; CHECK1234: declare i32 @g()
25define i32 @g(){
26entry:
27  br label %exit
28exit:
29  ret i32 0
30}
31
32; CHECK0:    define i8* @h()
33; CHECK1234: declare i8* @h()
34define i8* @h(){
35entry:
36  ret i8* blockaddress(@f, %exit)
37}
38