From 5624fe0cff7044ffb5e35ea24f093e8dd523b727 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 31 Aug 2011 21:50:07 +0000 Subject: [PATCH] Update to new EH scheme. llvm-svn: 138908 --- llvm/test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll | 5 ++++- llvm/test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll | 7 +++++++ llvm/test/Transforms/ADCE/dce_pure_invoke.ll | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/llvm/test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll b/llvm/test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll index 444ca8ec904b..6bbcfdb67ec5 100644 --- a/llvm/test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll +++ b/llvm/test/Transforms/ADCE/2003-09-10-UnwindInstFail.ll @@ -8,7 +8,9 @@ then: ; preds = %0 to label %invoke_cont unwind label %invoke_catch invoke_catch: ; preds = %then - unwind + %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + cleanup + resume { i8*, i32 } %exn invoke_cont: ; preds = %then ret void @@ -17,3 +19,4 @@ endif: ; preds = %0 ret void } +declare i32 @__gxx_personality_v0(...) diff --git a/llvm/test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll b/llvm/test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll index 991e876a25b7..f4ecd42cefa4 100644 --- a/llvm/test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll +++ b/llvm/test/Transforms/ADCE/2005-02-17-PHI-Invoke-Crash.ll @@ -15,6 +15,8 @@ tmp.3.i.noexc: ; preds = %entry br i1 false, label %then.0, label %else.0 invoke_catch.0: ; preds = %entry + %exn.0 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + cleanup invoke void @q_atomic_decrement( ) to label %tmp.1.i.i183.noexc unwind label %terminate @@ -26,6 +28,8 @@ then.0: ; preds = %tmp.3.i.noexc to label %invoke_cont.1 unwind label %invoke_catch.1 invoke_catch.1: ; preds = %then.0 + %exn.1 = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + cleanup invoke void @q_atomic_decrement( ) to label %tmp.1.i.i162.noexc unwind label %terminate @@ -40,6 +44,9 @@ else.0: ; preds = %tmp.3.i.noexc terminate: ; preds = %invoke_catch.1, %invoke_catch.0 %dbg.0.1 = phi { }* [ null, %invoke_catch.1 ], [ null, %invoke_catch.0 ] ; <{ }*> [#uses=0] + %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + cleanup unreachable } +declare i32 @__gxx_personality_v0(...) diff --git a/llvm/test/Transforms/ADCE/dce_pure_invoke.ll b/llvm/test/Transforms/ADCE/dce_pure_invoke.ll index c16d45cc2393..8e7851804575 100644 --- a/llvm/test/Transforms/ADCE/dce_pure_invoke.ll +++ b/llvm/test/Transforms/ADCE/dce_pure_invoke.ll @@ -11,5 +11,9 @@ Cont: ; preds = %0 ret i32 0 Other: ; preds = %0 + %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 + cleanup ret i32 1 } + +declare i32 @__gxx_personality_v0(...)