blob: 9e690189d99b1b6b3bfce15f7f64681eef0fa86f [file] [log] [blame]
Chris Lattner1853f282003-08-24 12:16:58 +00001; Test that we can inline a simple function, turning the calls in it into invoke
Chris Lattner0f12ef62003-08-24 06:55:07 +00002; instructions
3
Reid Spencer951d8dc2007-04-15 08:30:33 +00004; RUN: llvm-upgrade < %s | llvm-as | opt -inline | llvm-dis | \
5; RUN: not grep {call\[^e\]}
Chris Lattner0f12ef62003-08-24 06:55:07 +00006
7declare void %might_throw()
8
9implementation
10
11internal void %callee() {
12 call void %might_throw()
13 ret void
14}
15
16; caller returns true if might_throw throws an exception...
17int %caller() {
18 invoke void %callee() to label %cont except label %exc
19cont:
20 ret int 0
21exc:
22 ret int 1
23}