1 ; Test that we can inline a simple function, turning the calls in it into invoke
4 ; RUN: opt < %s -passes=inline -S | FileCheck %s
5 ; RUN: opt < %s -passes='cgscc(inline)' -S | FileCheck %s
6 ; RUN: opt < %s -passes='module-inline' -S | FileCheck %s
8 declare void @might_throw()
10 define internal void @callee() {
12 call void @might_throw()
16 ; caller returns true if might_throw throws an exception...
17 define i32 @caller() personality ptr @__gxx_personality_v0 {
18 ; CHECK-LABEL: define i32 @caller() personality ptr @__gxx_personality_v0
21 to label %cont unwind label %exc
23 ; CHECK: invoke void @might_throw()
29 %exn = landingpad {ptr, i32}
34 declare i32 @__gxx_personality_v0(...)