For PR1319:
[oota-llvm.git] / test / Transforms / Inline / invoke_test-1.ll
1 ; Test that we can inline a simple function, turning the calls in it into invoke
2 ; instructions
3
4 ; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | \
5 ; RUN:   not grep {call\[^e\]}
6
7 declare void %might_throw()
8
9 implementation
10
11 internal void %callee() {
12         call void %might_throw()
13         ret void
14 }
15
16 ; caller returns true if might_throw throws an exception...
17 int %caller() {
18         invoke void %callee() to label %cont except label %exc
19 cont:
20         ret int 0
21 exc:
22         ret int 1
23 }