]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/LTO/linkonce_odr_func.ll
Vendor import of llvm release_34 branch r197841 (effectively, 3.4 RC3):
[FreeBSD/FreeBSD.git] / test / LTO / linkonce_odr_func.ll
1 ; RUN: llvm-as < %s >%t1
2 ; RUN: llvm-lto -o %t2 -dso-symbol=foo1 -dso-symbol=foo2 -dso-symbol=foo3 \
3 ; RUN:     -dso-symbol=foo4  %t1 -disable-opt
4 ; RUN: llvm-nm %t2 | FileCheck %s
5
6 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
7 target triple = "x86_64-unknown-linux-gnu"
8
9 ; CHECK: t foo1
10 define linkonce_odr void @foo1() noinline {
11   ret void
12 }
13
14 ; CHECK: W foo2
15 define linkonce_odr void @foo2() noinline {
16   ret void
17 }
18
19 ; CHECK: t foo3
20 define linkonce_odr void @foo3() noinline {
21   ret void
22 }
23
24 ; CHECK: W foo4
25 define linkonce_odr void @foo4() noinline {
26   ret void
27 }
28
29 declare void @f(void()*)
30
31 declare void @p()
32
33 define void @bar() {
34 bb0:
35   call void @foo1()
36   call void @f(void()* @foo2)
37   invoke void @foo3() to label %bb1 unwind label %clean
38 bb1:
39   invoke void @f(void()* @foo4) to label %bb2 unwind label %clean
40 bb2:
41   ret void
42 clean:
43   landingpad {i32, i32} personality void()* @p cleanup
44   ret void
45 }