• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; 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
8; CHECK0: declare i32 @fun1
9; CHECK0: declare i32 @fun2
10; 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
33