1 ; RUN: opt %s -passes=inline -S | FileCheck %s
2 ; RUN: opt %s -passes='cgscc(inline)' -S | FileCheck %s
3 ; RUN: opt %s -passes='module-inline' -S | FileCheck %s
5 declare void @external_func()
7 @exception_type1 = external global i8
8 @exception_type2 = external global i8
11 define internal void @inner() personality ptr null {
12 invoke void @external_func()
13 to label %cont unwind label %lpad
18 catch ptr @exception_type1
22 ; Test that the "cleanup" clause is kept when inlining @inner() into
23 ; this call site (PR17872), otherwise C++ destructors will not be
24 ; called when they should be.
26 define void @outer() personality ptr null {
28 to label %cont unwind label %lpad
34 catch ptr @exception_type2
37 ; CHECK: define void @outer
40 ; CHECK-NEXT: catch ptr @exception_type1
41 ; CHECK-NEXT: catch ptr @exception_type2