testcase for the recent inliner improvement.
[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-as < %s | opt -inline | llvm-dis | not grep 'call[^e]'
5
6 declare void %might_throw()
7
8 implementation
9
10 internal void %callee() {
11         call void %might_throw()
12         ret void
13 }
14
15 ; caller returns true if might_throw throws an exception...
16 int %caller() {
17         invoke void %callee() to label %cont except label %exc
18 cont:
19         ret int 0
20 exc:
21         ret int 1
22 }