[SEH] Update SEH codegen tests to use the new IR
[oota-llvm.git] / test / CodeGen / WinEH / cppeh-similar-catch-blocks.ll
index c0df74e29d6a2679f996ea294caf2977a0196c70..0921353681580c78735ce8dcae12c2914e079446 100644 (file)
@@ -86,12 +86,12 @@ $"\01??_C@_03PMGGPEJJ@?$CFd?6?$AA@" = comdat any
 ; This is just a minimal check to verify that main was handled by WinEHPrepare.
 ; CHECK: define i32 @main()
 ; CHECK: entry:
-; CHECK:   call void (...) @llvm.frameescape(i8* [[C_PTR:\%.+]], i32* [[X_PTR:\%.+]], i8* [[C2_PTR:\%.+]], i32* [[X2_PTR:\%.+]], i8* [[C3_PTR:\%.+]])
+; CHECK:   call void (...) @llvm.localescape(i32* [[X_PTR:\%.+]], i32* [[X2_PTR:\%.+]], i8* [[C2_PTR:\%.+]], i8* [[C3_PTR:\%.+]], i8* [[C_PTR:\%.+]])
 ; CHECK:   invoke void @_CxxThrowException
 ; CHECK: }
 
 ; Function Attrs: uwtable
-define i32 @main() #0 {
+define i32 @main() #0 personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*) {
 entry:
   %retval = alloca i32, align 4
   %tmp = alloca i8, align 1
@@ -111,7 +111,7 @@ entry:
           to label %unreachable unwind label %lpad
 
 lpad:                                             ; preds = %entry
-  %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+  %0 = landingpad { i8*, i32 }
           catch %eh.CatchHandlerType* @llvm.eh.handlertype.D.0
           catch %eh.CatchHandlerType* @llvm.eh.handlertype.H.0
           catch i8* null
@@ -132,7 +132,7 @@ catch:                                            ; preds = %catch.dispatch
   call void @llvm.eh.begincatch(i8* %exn, i8* %c) #2
   %4 = load i8, i8* %c, align 1
   %conv = sext i8 %4 to i32
-  %call = invoke i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PJCJOCBM@?$CFc?6?$AA@", i32 0, i32 0), i32 %conv)
+  %call = invoke i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PJCJOCBM@?$CFc?6?$AA@", i32 0, i32 0), i32 %conv)
           to label %invoke.cont unwind label %lpad2
 
 invoke.cont:                                      ; preds = %catch
@@ -146,7 +146,7 @@ try.cont:                                         ; preds = %invoke.cont
           to label %unreachable unwind label %lpad4
 
 lpad2:                                            ; preds = %catch
-  %6 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+  %6 = landingpad { i8*, i32 }
           catch %eh.CatchHandlerType* @llvm.eh.handlertype.H.0
           catch i8* null
   %7 = extractvalue { i8*, i32 } %6, 0
@@ -157,7 +157,7 @@ lpad2:                                            ; preds = %catch
   br label %catch.dispatch5
 
 lpad4:                                            ; preds = %try.cont
-  %9 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+  %9 = landingpad { i8*, i32 }
           catch %eh.CatchHandlerType* @llvm.eh.handlertype.H.0
           catch i8* null
   %10 = extractvalue { i8*, i32 } %9, 0
@@ -177,7 +177,7 @@ catch13:                                          ; preds = %catch.dispatch5
   %13 = bitcast i32* %x to i8*
   call void @llvm.eh.begincatch(i8* %exn14, i8* %13) #2
   %14 = load i32, i32* %x, align 4
-  %call18 = invoke i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PMGGPEJJ@?$CFd?6?$AA@", i32 0, i32 0), i32 %14)
+  %call18 = invoke i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PMGGPEJJ@?$CFd?6?$AA@", i32 0, i32 0), i32 %14)
           to label %invoke.cont17 unwind label %lpad16
 
 invoke.cont17:                                    ; preds = %catch13
@@ -192,7 +192,7 @@ try.cont19:                                       ; preds = %invoke.cont17, %inv
 catch8:                                           ; preds = %catch.dispatch5
   %exn9 = load i8*, i8** %exn.slot
   call void @llvm.eh.begincatch(i8* %exn9, i8* null) #2
-  %call12 = invoke i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @"\01??_C@_04MPPNMCOK@?4?4?4?6?$AA@", i32 0, i32 0))
+  %call12 = invoke i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @"\01??_C@_04MPPNMCOK@?4?4?4?6?$AA@", i32 0, i32 0))
           to label %invoke.cont11 unwind label %lpad10
 
 invoke.cont11:                                    ; preds = %catch8
@@ -200,7 +200,7 @@ invoke.cont11:                                    ; preds = %catch8
   br label %try.cont19
 
 lpad10:                                           ; preds = %catch8
-  %15 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+  %15 = landingpad { i8*, i32 }
           cleanup
   %16 = extractvalue { i8*, i32 } %15, 0
   store i8* %16, i8** %exn.slot
@@ -210,7 +210,7 @@ lpad10:                                           ; preds = %catch8
   br label %eh.resume
 
 lpad16:                                           ; preds = %catch13
-  %18 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+  %18 = landingpad { i8*, i32 }
           cleanup
   %19 = extractvalue { i8*, i32 } %18, 0
   store i8* %19, i8** %exn.slot
@@ -220,7 +220,7 @@ lpad16:                                           ; preds = %catch13
   br label %eh.resume
 
 lpad21:                                           ; preds = %try.cont19
-  %21 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+  %21 = landingpad { i8*, i32 }
           catch i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.D.0 to i8*)
           catch i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.H.0 to i8*)
           catch i8* null
@@ -241,7 +241,7 @@ catch25:                                          ; preds = %catch.dispatch22
   call void @llvm.eh.begincatch(i8* %exn26, i8* %c28) #2
   %25 = load i8, i8* %c28, align 1
   %conv29 = sext i8 %25 to i32
-  %call32 = invoke i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PJCJOCBM@?$CFc?6?$AA@", i32 0, i32 0), i32 %conv29)
+  %call32 = invoke i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PJCJOCBM@?$CFc?6?$AA@", i32 0, i32 0), i32 %conv29)
           to label %invoke.cont31 unwind label %lpad30
 
 invoke.cont31:                                    ; preds = %catch25
@@ -255,7 +255,7 @@ try.cont33:                                       ; preds = %invoke.cont31
           to label %unreachable unwind label %lpad35
 
 lpad30:                                           ; preds = %catch25
-  %27 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+  %27 = landingpad { i8*, i32 }
           catch i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.H.0 to i8*)
           catch i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.D.0 to i8*)
           catch i8* null
@@ -267,7 +267,7 @@ lpad30:                                           ; preds = %catch25
   br label %catch.dispatch36
 
 lpad35:                                           ; preds = %try.cont33
-  %30 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+  %30 = landingpad { i8*, i32 }
           catch i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.H.0 to i8*)
           catch i8* bitcast (%eh.CatchHandlerType* @llvm.eh.handlertype.D.0 to i8*)
           catch i8* null
@@ -288,7 +288,7 @@ catch53:                                          ; preds = %catch.dispatch36
   %34 = bitcast i32* %x56 to i8*
   call void @llvm.eh.begincatch(i8* %exn54, i8* %34) #2
   %35 = load i32, i32* %x56, align 4
-  %call59 = invoke i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PMGGPEJJ@?$CFd?6?$AA@", i32 0, i32 0), i32 %35)
+  %call59 = invoke i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PMGGPEJJ@?$CFd?6?$AA@", i32 0, i32 0), i32 %35)
           to label %invoke.cont58 unwind label %lpad57
 
 invoke.cont58:                                    ; preds = %catch53
@@ -308,7 +308,7 @@ catch45:                                          ; preds = %catch.fallthrough
   call void @llvm.eh.begincatch(i8* %exn46, i8* %c48) #2
   %37 = load i8, i8* %c48, align 1
   %conv49 = sext i8 %37 to i32
-  %call52 = invoke i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PJCJOCBM@?$CFc?6?$AA@", i32 0, i32 0), i32 %conv49)
+  %call52 = invoke i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @"\01??_C@_03PJCJOCBM@?$CFc?6?$AA@", i32 0, i32 0), i32 %conv49)
           to label %invoke.cont51 unwind label %lpad50
 
 invoke.cont51:                                    ; preds = %catch45
@@ -318,7 +318,7 @@ invoke.cont51:                                    ; preds = %catch45
 catch40:                                          ; preds = %catch.fallthrough
   %exn41 = load i8*, i8** %exn.slot
   call void @llvm.eh.begincatch(i8* %exn41, i8* null) #2
-  %call44 = invoke i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @"\01??_C@_04MPPNMCOK@?4?4?4?6?$AA@", i32 0, i32 0))
+  %call44 = invoke i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @"\01??_C@_04MPPNMCOK@?4?4?4?6?$AA@", i32 0, i32 0))
           to label %invoke.cont43 unwind label %lpad42
 
 invoke.cont43:                                    ; preds = %catch40
@@ -326,7 +326,7 @@ invoke.cont43:                                    ; preds = %catch40
   br label %try.cont60
 
 lpad42:                                           ; preds = %catch40
-  %38 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+  %38 = landingpad { i8*, i32 }
           cleanup
   %39 = extractvalue { i8*, i32 } %38, 0
   store i8* %39, i8** %exn.slot
@@ -336,7 +336,7 @@ lpad42:                                           ; preds = %catch40
   br label %eh.resume
 
 lpad50:                                           ; preds = %catch45
-  %41 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+  %41 = landingpad { i8*, i32 }
           cleanup
   %42 = extractvalue { i8*, i32 } %41, 0
   store i8* %42, i8** %exn.slot
@@ -346,7 +346,7 @@ lpad50:                                           ; preds = %catch45
   br label %eh.resume
 
 lpad57:                                           ; preds = %catch53
-  %44 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+  %44 = landingpad { i8*, i32 }
           cleanup
   %45 = extractvalue { i8*, i32 } %44, 0
   store i8* %45, i8** %exn.slot