1 ; RUN: opt %s -inline -S | FileCheck %s
2 ; RUN: opt %s -passes='cgscc(inline)' -S | FileCheck %s
4 declare void @external_func()
6 @exception_type1 = external global i8
7 @exception_type2 = external global i8
10 define internal void @inner() personality i8* null {
11 invoke void @external_func()
12 to label %cont unwind label %lpad
17 catch i8* @exception_type1
21 ; Test that the "cleanup" clause is kept when inlining @inner() into
22 ; this call site (PR17872), otherwise C++ destructors will not be
23 ; called when they should be.
25 define void @outer() personality i8* null {
27 to label %cont unwind label %lpad
33 catch i8* @exception_type2
36 ; CHECK: define void @outer
39 ; CHECK-NEXT: catch i8* @exception_type1
40 ; CHECK-NEXT: catch i8* @exception_type2