X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=test%2FCodeGen%2FWinEH%2Fcppeh-catch-all.ll;h=a84b8645fe40f615519619599374636b0e59f85d;hp=d1141e38638fc86f6aa53a00d9322087ec7359d7;hb=1134ac4a0f754b75524687fc86ab4aa10562a1b8;hpb=fba5b65942f81ece926eeb4114f41cb27fdcb9d7 diff --git a/test/CodeGen/WinEH/cppeh-catch-all.ll b/test/CodeGen/WinEH/cppeh-catch-all.ll index d1141e38638..a84b8645fe4 100644 --- a/test/CodeGen/WinEH/cppeh-catch-all.ll +++ b/test/CodeGen/WinEH/cppeh-catch-all.ll @@ -18,6 +18,12 @@ 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() #0 { +; 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 { entry: @@ -29,6 +35,16 @@ entry: invoke.cont: ; preds = %entry br label %try.cont +; CHECK: [[LPAD_LABEL]]:{{[ ]+}}; preds = %entry +; CHECK: [[LPAD_VAL:\%.+]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) +; CHECK: catch i8* null +; CHECK-NOT: extractvalue { i8*, i32 } +; CHECK-NOT: store i8* +; CHECK-NOT: store i32 +; CHECK-NOT: br label %catch +; CHECK: [[RECOVER:\%.+]] = call i8* (...)* @llvm.eh.actions({ i8*, i32 } [[LPAD_VAL]], i32 0, i8* null, i8* null, i8* bitcast (i8* (i8*, i8*)* @_Z4testv.catch to i8*)) +; CHECK: indirectbr i8* [[RECOVER]], [label %try.cont] + lpad: ; preds = %entry %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) catch i8* null @@ -38,18 +54,24 @@ 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*) {