• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Test that we can inline a simple function, turning the calls in it into invoke
2; instructions
3
4; RUN: opt < %s -inline -S | \
5; RUN:   not grep {call\[^e\]}
6
7declare void @might_throw()
8
9define internal void @callee() {
10        call void @might_throw( )
11        ret void
12}
13
14; caller returns true if might_throw throws an exception...
15define i32 @caller() {
16        invoke void @callee( )
17                        to label %cont unwind label %exc
18
19cont:           ; preds = %0
20        ret i32 0
21
22exc:            ; preds = %0
23        ret i32 1
24}
25