blob: 24bc961bf42e4d94dba83f324ae4c761cb86cbaf [file] [log] [blame]
Sergei Larind19d4d32016-01-18 21:07:13 +00001; All functions in the same comdat group must
2; be in the same module
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
Rafael Espindolae4b02312018-01-11 22:15:05 +00008; CHECK0: declare dso_local i32 @fun1
9; CHECK0: declare dso_local i32 @fun2
Sergei Larind19d4d32016-01-18 21:07:13 +000010; CHECK0: declare i32 @fun3
11
12; CHECK1: define internal i32 @fun1
13; CHECK1: define internal i32 @fun2
14; CHECK1: define i32 @fun3
15
16$fun = comdat any
17
18define internal i32 @fun1() section ".text.funs" comdat($fun) {
19entry:
20 ret i32 0
21}
22
23define internal i32 @fun2() section ".text.funs" comdat($fun) {
24entry:
25 ret i32 0
26}
27
28define i32 @fun3() section ".text.funs" comdat($fun) {
29entry:
30 ret i32 0
31}
32