summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/nrvo.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-09-19 20:31:14 +0000
committerBill Wendling <isanbard@gmail.com>2011-09-19 20:31:14 +0000
commitf0724e8e06897783595b353b71158b62f0b85729 (patch)
treef4baf1c09e13b66d68686bf76a2d5fa0c01010a3 /clang/test/CodeGenCXX/nrvo.cpp
parentee9ff79319574d5b4f84e87d8e23b1c15482f186 (diff)
downloadbcm5719-llvm-f0724e8e06897783595b353b71158b62f0b85729.tar.gz
bcm5719-llvm-f0724e8e06897783595b353b71158b62f0b85729.zip
Throw the switch to convert clang to the new exception handling model!
This model uses the 'landingpad' instruction, which is pinned to the top of the landing pad. (A landing pad is defined as the destination of the unwind branch of an invoke instruction.) All of the information needed to generate the correct exception handling metadata during code generation is encoded into the landingpad instruction. The new 'resume' instruction takes the place of the llvm.eh.resume intrinsic call. It's lowered in much the same way as the intrinsic is. llvm-svn: 140049
Diffstat (limited to 'clang/test/CodeGenCXX/nrvo.cpp')
-rw-r--r--clang/test/CodeGenCXX/nrvo.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/clang/test/CodeGenCXX/nrvo.cpp b/clang/test/CodeGenCXX/nrvo.cpp
index 0efb3553803..57bf27ab7af 100644
--- a/clang/test/CodeGenCXX/nrvo.cpp
+++ b/clang/test/CodeGenCXX/nrvo.cpp
@@ -68,8 +68,10 @@ X test2(bool B) {
// -> %cleanup, %lpad1
// %lpad: landing pad for ctor of 'y', dtor of 'y'
- // CHECK-EH: call i8* @llvm.eh.exception()
- // CHECK-EH: call i32 (i8*, i8*, ...)* @llvm.eh.selector
+ // CHECK-EH: [[CAUGHTVAL:%.*]] = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ // CHECK-EH-NEXT: cleanup
+ // CHECK-EH-NEXT: extractvalue { i8*, i32 } [[CAUGHTVAL]], 0
+ // CHECK-EH-NEXT: extractvalue { i8*, i32 } [[CAUGHTVAL]], 1
// CHECK-EH-NEXT: br label
// -> %eh.cleanup
@@ -95,12 +97,11 @@ X test2(bool B) {
// %invoke.cont17: rethrow block for %eh.cleanup.
// This really should be elsewhere in the function.
- // CHECK-EH: call void @llvm.eh.resume(
- // CHECK-EH-NEXT: unreachable
+ // CHECK-EH: resume { i8*, i32 }
// %terminate.lpad: terminate landing pad.
- // CHECK-EH: call i8* @llvm.eh.exception()
- // CHECK-EH-NEXT: call i32 (i8*, i8*, ...)* @llvm.eh.selector
+ // CHECK-EH: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ // CHECK-EH-NEXT: catch i8* null
// CHECK-EH-NEXT: call void @_ZSt9terminatev()
// CHECK-EH-NEXT: unreachable
OpenPOWER on IntegriCloud