Update to new EH scheme.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138927 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Transforms/IndVarSimplify/2004-04-05-InvokeCastCrash.ll b/test/Transforms/IndVarSimplify/2004-04-05-InvokeCastCrash.ll
index 1ed4c44..708a961 100644
--- a/test/Transforms/IndVarSimplify/2004-04-05-InvokeCastCrash.ll
+++ b/test/Transforms/IndVarSimplify/2004-04-05-InvokeCastCrash.ll
@@ -110,12 +110,16 @@
 
 declare void @_ZNK4llvm19MachineInstrBuilder7addSImmEi()
 
+declare i32 @__gxx_personality_v0(...)
+
 define void @_ZN4llvm11_GLOBAL__N_22InsertPrologEpilogCode20runOnMachineFunctionERNS_15MachineFunctionE(%"struct.llvm::MachineFunction"* %F) {
 entry:
 	%tmp.8.i = invoke %"struct.llvm::TargetFrameInfo"* null( %"struct.llvm::TargetMachine"* null )
 			to label %invoke_cont.0.i unwind label %invoke_catch.0.i		; <%"struct.llvm::TargetFrameInfo"*> [#uses=0]
 
 invoke_catch.0.i:		; preds = %invoke_cont.49.i, %invoke_cont.48.i, %invoke_cont.47.i, %invoke_cont.i53.i, %no_exit.i, %invoke_cont.44.i, %invoke_cont.43.i, %invoke_cont.42.i, %invoke_cont.41.i, %invoke_cont.40.i, %invoke_cont.39.i, %invoke_cont.38.i, %invoke_cont.37.i, %then.2.i, %invoke_cont.35.i, %invoke_cont.34.i, %then.1.i, %endif.0.i, %invoke_cont.9.i, %invoke_cont.8.i, %invoke_cont.7.i, %invoke_cont.i.i, %then.0.i, %invoke_cont.4.i, %invoke_cont.3.i, %invoke_cont.2.i, %invoke_cont.1.i, %endif.0.i.i, %tmp.7.i.noexc.i, %invoke_cont.0.i, %entry
+        %exn0.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	ret void
 
 invoke_cont.0.i:		; preds = %entry
@@ -164,6 +168,8 @@
 			to label %invoke_cont.i.i unwind label %cond_true.i.i
 
 cond_true.i.i:		; preds = %tmp.0.i.noexc.i
+        %exn.i.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	ret void
 
 invoke_cont.i.i:		; preds = %tmp.0.i.noexc.i
@@ -256,6 +262,8 @@
 			to label %invoke_cont.i53.i unwind label %cond_true.i52.i
 
 cond_true.i52.i:		; preds = %tmp.0.i.noexc55.i
+        %exn.i52.i = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	ret void
 
 invoke_cont.i53.i:		; preds = %tmp.0.i.noexc55.i
diff --git a/test/Transforms/IndVarSimplify/2005-02-11-InvokeCrash.ll b/test/Transforms/IndVarSimplify/2005-02-11-InvokeCrash.ll
index aee67cc..a5706ca 100644
--- a/test/Transforms/IndVarSimplify/2005-02-11-InvokeCrash.ll
+++ b/test/Transforms/IndVarSimplify/2005-02-11-InvokeCrash.ll
@@ -5,9 +5,6 @@
         %tmp.7 = invoke i32 @_ZN5ArrayISt7complexIdEE8get_sizeERK10dim_vector( )
                         to label %invoke_cont.0 unwind label %cond_true.1               ; <i32> [#uses=2]
 
-cond_true.1:            ; preds = %entry
-        unwind
-
 invoke_cont.0:          ; preds = %entry
         %tmp.4.i = bitcast i32 %tmp.7 to i32            ; <i32> [#uses=0]
         %tmp.14.0.i5 = add i32 %tmp.7, -1               ; <i32> [#uses=1]
@@ -17,7 +14,14 @@
         %tmp.14.0.i.0 = phi i32 [ %tmp.14.0.i, %no_exit.i ], [ %tmp.14.0.i5, %invoke_cont.0 ]           ; <i32> [#uses=1]
         %tmp.14.0.i = add i32 %tmp.14.0.i.0, -1         ; <i32> [#uses=1]
         br label %no_exit.i
+
+cond_true.1:            ; preds = %entry
+        %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
+        resume { i8*, i32 } %exn
 }
 
+declare i32 @__gxx_personality_v0(...)
+
 declare i32 @_ZN5ArrayISt7complexIdEE8get_sizeERK10dim_vector()
 
diff --git a/test/Transforms/IndVarSimplify/2005-02-17-TruncateExprCrash.ll b/test/Transforms/IndVarSimplify/2005-02-17-TruncateExprCrash.ll
index 70a7a9d..ce043be 100644
--- a/test/Transforms/IndVarSimplify/2005-02-17-TruncateExprCrash.ll
+++ b/test/Transforms/IndVarSimplify/2005-02-17-TruncateExprCrash.ll
@@ -10,6 +10,8 @@
 			to label %endif.1 unwind label %then.i.i551
 
 then.i.i551:		; preds = %entry
+        %exn551 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	ret void
 
 endif.1:		; preds = %entry
@@ -20,6 +22,8 @@
 			to label %loopentry.0 unwind label %invoke_catch.6
 
 invoke_catch.6:		; preds = %then.2
+        %exn6 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+                 cleanup
 	ret void
 
 loopentry.0:		; preds = %then.2
@@ -59,3 +63,5 @@
 then.i.i:		; preds = %endif.1
 	ret void
 }
+
+declare i32 @__gxx_personality_v0(...)
diff --git a/test/Transforms/IndVarSimplify/crash.ll b/test/Transforms/IndVarSimplify/crash.ll
index 9499978..3335be7 100644
--- a/test/Transforms/IndVarSimplify/crash.ll
+++ b/test/Transforms/IndVarSimplify/crash.ll
@@ -80,6 +80,8 @@
   br label %"3.i"
 
 "7.i":                                            ; preds = %"3.i"
+  %2 = landingpad { i8*, i32 } personality i32 (i32, i64, i8*, i8*)* @__gccgo_personality_v0
+          catch i8* null
   br label %"3.i"
 
 main.f.exit:                                      ; preds = %"3.i"
diff --git a/test/Transforms/IndVarSimplify/interesting-invoke-use.ll b/test/Transforms/IndVarSimplify/interesting-invoke-use.ll
index 8adc0e5..69bea6e 100644
--- a/test/Transforms/IndVarSimplify/interesting-invoke-use.ll
+++ b/test/Transforms/IndVarSimplify/interesting-invoke-use.ll
@@ -47,9 +47,13 @@
   br label %bb123
 
 lpad266:                ; preds = %invcont129, %bb128, %bb123
+  %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0
+            cleanup
   unreachable
 }
 
+declare i32 @__gxx_personality_v0(...)
+
 declare void @system__img_int__image_integer(%struct.string___XUP* noalias sret, i32)
 
 declare void @system__string_ops__str_concat(%struct.string___XUP* noalias sret, [0 x i8]*, %struct.string___XUB*, [0 x i8]*, %struct.string___XUB*)