137 lines · plain
1; RUN: llvm-as < %s | llvm-dis > %t1.ll2; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll3; RUN: diff %t1.ll %t2.ll4 5@_ZTIc = external constant ptr6@_ZTId = external constant ptr7@_ZTIPKc = external constant ptr8 9define void @_Z3barv() uwtable optsize ssp personality ptr @__gxx_personality_v0 {10entry:11 invoke void @_Z3quxv() optsize12 to label %try.cont unwind label %lpad13 14try.cont: ; preds = %entry, %invoke.cont415 ret void16 17lpad: ; preds = %entry18 %exn = landingpad {ptr, i32}19 cleanup20 catch ptr @_ZTIc21 filter [2 x ptr] [ptr @_ZTIPKc, ptr @_ZTId]22 resume { ptr, i32 } %exn23}24 25declare void @_Z3quxv() optsize26 27declare i32 @__gxx_personality_v0(...)28 29define void @cleanupret0() personality ptr @__gxx_personality_v0 {30entry:31 invoke void @_Z3quxv() optsize32 to label %exit unwind label %pad33pad:34 %cp = cleanuppad within none [i7 4]35 cleanupret from %cp unwind to caller36exit:37 ret void38}39 40; forward ref by name41define void @cleanupret1() personality ptr @__gxx_personality_v0 {42entry:43 invoke void @_Z3quxv() optsize44 to label %exit unwind label %pad45cleanup:46 cleanupret from %cp unwind to caller47pad:48 %cp = cleanuppad within none []49 br label %cleanup50exit:51 ret void52}53 54; forward ref by ID55define void @cleanupret2() personality ptr @__gxx_personality_v0 {56entry:57 invoke void @_Z3quxv() optsize58 to label %exit unwind label %pad59cleanup:60 cleanupret from %0 unwind to caller61pad:62 %0 = cleanuppad within none []63 br label %cleanup64exit:65 ret void66}67 68define void @catchret0() personality ptr @__gxx_personality_v0 {69entry:70 invoke void @_Z3quxv() optsize71 to label %exit unwind label %pad72pad:73 %cs1 = catchswitch within none [label %catch] unwind to caller74catch:75 %cp = catchpad within %cs1 [i7 4]76 catchret from %cp to label %exit77exit:78 ret void79}80 81; forward ref by name82define void @catchret1() personality ptr @__gxx_personality_v0 {83entry:84 invoke void @_Z3quxv() optsize85 to label %exit unwind label %pad86catchret:87 catchret from %cp to label %exit88pad:89 %cs1 = catchswitch within none [label %catch] unwind to caller90catch:91 %cp = catchpad within %cs1 [i7 4]92 br label %catchret93exit:94 ret void95}96 97; forward ref by ID98define void @catchret2() personality ptr @__gxx_personality_v0 {99entry:100 invoke void @_Z3quxv() optsize101 to label %exit unwind label %pad102catchret:103 catchret from %0 to label %exit104pad:105 %cs1 = catchswitch within none [label %catch] unwind to caller106catch:107 %0 = catchpad within %cs1 [i7 4]108 br label %catchret109exit:110 ret void111}112 113define i8 @catchpad() personality ptr @__gxx_personality_v0 {114entry:115 invoke void @_Z3quxv() optsize116 to label %exit unwind label %bb2117bb2:118 %cs1 = catchswitch within none [label %catch] unwind to caller119catch:120 catchpad within %cs1 [i7 4]121 br label %exit122exit:123 ret i8 0124}125 126define void @cleanuppad() personality ptr @__gxx_personality_v0 {127entry:128 br label %try.cont129 130try.cont:131 invoke void @_Z3quxv() optsize132 to label %try.cont unwind label %bb133bb:134 cleanuppad within none [i7 4]135 ret void136}137