forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdelete-unused-function.ll
63 lines (51 loc) · 1006 Bytes
/
delete-unused-function.ll
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
; RUN: opt -passes=inline < %s -S | FileCheck %s
; CHECK: define {{.*}}@caller
; CHECK: define {{.*}}@f1
; CHECK-NOT: define {{.*}}@f2
; CHECK-NOT: define {{.*}}@f3
; CHECK-NOT: define {{.*}}@f4
; CHECK-NOT: define {{.*}}@f5
; CHECK: define {{.*}}@f6
; CHECK-NOT: define {{.*}}@f7
; CHECK-NOT: define {{.*}}@f8
$c1 = comdat any
$c2 = comdat any
$c3 = comdat any
define void @caller() {
call void @f1()
call void @f2()
call void @f3()
call void @f4()
call void @f5()
call void @f6()
call void @f7()
call void @f8()
ret void
}
define void @f1() {
ret void
}
define internal void @f2() {
ret void
}
define private void @f3() {
ret void
}
define linkonce_odr void @f4() {
ret void
}
define linkonce_odr void @f5() comdat($c1) {
ret void
}
define linkonce_odr void @f6() comdat($c2) {
ret void
}
define linkonce_odr void @g() comdat($c2) {
ret void
}
define linkonce_odr void @f7() comdat($c3) {
ret void
}
define linkonce_odr void @f8() comdat($c3) {
ret void
}