X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=test%2FCodeGen%2FWinEH%2Fcppeh-catch-all.ll;h=266dd3e305ca60c563f225e1a9335b6d403bd275;hb=00552e3875ee5f382db6c98286a241a7d0efe1b8;hp=d1141e38638fc86f6aa53a00d9322087ec7359d7;hpb=9f7c86141659e7637fb099bc41b1e015bbb42781;p=oota-llvm.git diff --git a/test/CodeGen/WinEH/cppeh-catch-all.ll b/test/CodeGen/WinEH/cppeh-catch-all.ll index d1141e38638..266dd3e305c 100644 --- a/test/CodeGen/WinEH/cppeh-catch-all.ll +++ b/test/CodeGen/WinEH/cppeh-catch-all.ll @@ -18,8 +18,14 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-windows-msvc" +; The function entry in this case remains unchanged. +; CHECK: define void @_Z4testv() +; CHECK: entry: +; CHECK: invoke void @_Z9may_throwv() +; CHECK: to label %invoke.cont unwind label %[[LPAD_LABEL:lpad[0-9]*]] + ; Function Attrs: uwtable -define void @_Z4testv() #0 { +define void @_Z4testv() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) { entry: %exn.slot = alloca i8* %ehselector.slot = alloca i32 @@ -29,8 +35,14 @@ entry: invoke.cont: ; preds = %entry br label %try.cont +; CHECK: [[LPAD_LABEL]]:{{[ ]+}}; preds = %entry +; CHECK: landingpad { i8*, i32 } +; CHECK-NEXT: catch i8* null +; CHECK-NEXT: [[RECOVER:\%.+]] = call i8* (...) @llvm.eh.actions(i32 1, i8* null, i32 -1, i8* (i8*, i8*)* @_Z4testv.catch) +; CHECK-NEXT: indirectbr i8* [[RECOVER]], [label %try.cont] + lpad: ; preds = %entry - %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) + %tmp = landingpad { i8*, i32 } catch i8* null %tmp1 = extractvalue { i8*, i32 } %tmp, 0 store i8* %tmp1, i8** %exn.slot @@ -38,21 +50,27 @@ lpad: ; preds = %entry store i32 %tmp2, i32* %ehselector.slot br label %catch +; CHECK-NOT: catch: + catch: ; preds = %lpad %exn = load i8*, i8** %exn.slot call void @llvm.eh.begincatch(i8* %exn, i8* null) #2 call void @_Z16handle_exceptionv() br label %invoke.cont2 +; CHECK-NOT: invoke.cont2: + invoke.cont2: ; preds = %catch call void @llvm.eh.endcatch() br label %try.cont try.cont: ; preds = %invoke.cont2, %invoke.cont ret void + +; CHECK: } } -; CHECK: define internal i8* @_Z4testv.catch(i8*, i8*) { +; CHECK: define internal i8* @_Z4testv.catch(i8*, i8*) ; CHECK: entry: ; CHECK: call void @_Z16handle_exceptionv() ; CHECK: ret i8* blockaddress(@_Z4testv, %try.cont)