summaryrefslogtreecommitdiff
path: root/test/Transforms/Internalize/linkonce_odr_func.ll
blob: c82acc0174a180704ceefbb6df773f00d322632a (plain)
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
; RUN: opt < %s -internalize -internalize-dso-list foo1,foo2,foo3,foo4 -S | FileCheck %s

; CHECK: define internal void @foo1(
define linkonce_odr void @foo1() noinline {
  ret void
}

; CHECK: define linkonce_odr void @foo2(
define linkonce_odr void @foo2() noinline {
  ret void
}

; CHECK: define internal void @foo3(
define linkonce_odr void @foo3() noinline {
  ret void
}

; CHECK: define linkonce_odr void @foo4(
define linkonce_odr void @foo4() noinline {
  ret void
}

declare void @f(void()*)

define void @bar() {
bb0:
  call void @foo1()
  call void @f(void()* @foo2)
  invoke void @foo3() to label %bb1 unwind label %clean
bb1:
  invoke void @f(void()* @foo4) to label %bb2 unwind label %clean
bb2:
  ret void
clean:
  landingpad i32 personality i8* null cleanup
  ret void
}