summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC
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/CodeGenObjC
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/CodeGenObjC')
-rw-r--r--clang/test/CodeGenObjC/blocks-2.m5
-rw-r--r--clang/test/CodeGenObjC/gnu-exceptions.m6
-rw-r--r--clang/test/CodeGenObjC/terminate.m8
3 files changed, 10 insertions, 9 deletions
diff --git a/clang/test/CodeGenObjC/blocks-2.m b/clang/test/CodeGenObjC/blocks-2.m
index 5d63e919fb3..56eb8a7779c 100644
--- a/clang/test/CodeGenObjC/blocks-2.m
+++ b/clang/test/CodeGenObjC/blocks-2.m
@@ -30,8 +30,9 @@ void test1() {
// CHECK-NEXT: call void @_Block_object_dispose(i8* [[T1]], i32 8)
// CHECK-NEXT: ret void
- // CHECK: call i8* @llvm.eh.exception()
+ // CHECK: landingpad { i8*, i32 } personality
+ // CHECK-NEXT: cleanup
// CHECK: [[T1:%.*]] = bitcast [[N_T]]* [[N]] to i8*
// CHECK-NEXT: call void @_Block_object_dispose(i8* [[T1]], i32 8)
- // CHECK: call void @llvm.eh.resume(
+ // CHECK: resume { i8*, i32 }
}
diff --git a/clang/test/CodeGenObjC/gnu-exceptions.m b/clang/test/CodeGenObjC/gnu-exceptions.m
index 7f3ae9df467..8917bf3120d 100644
--- a/clang/test/CodeGenObjC/gnu-exceptions.m
+++ b/clang/test/CodeGenObjC/gnu-exceptions.m
@@ -14,9 +14,9 @@ void test0() {
// CHECK: call void @log(i32 1)
} @catch (C *c) {
- // CHECK: call i8* @llvm.eh.exception()
- // CHECK: call i32 (i8*, i8*, ...)* @llvm.eh.selector({{.*}} @__gnu_objc_personality_v0
- // CHECK: br i1
+ // CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gnu_objc_personality_v0 to i8*)
+ // CHECK-NEXT: catch i8* getelementptr inbounds ([2 x i8]* @0, i64 0, i64 0)
+ // CHECK: br i1
// CHECK: call void @log(i32 0)
diff --git a/clang/test/CodeGenObjC/terminate.m b/clang/test/CodeGenObjC/terminate.m
index f04eb6a92bb..0e01d890865 100644
--- a/clang/test/CodeGenObjC/terminate.m
+++ b/clang/test/CodeGenObjC/terminate.m
@@ -14,8 +14,8 @@ void test0(void) {
// CHECK-WITH: call void @destroy(i8** [[PTR]])
// CHECK-WITH-NEXT: ret void
// CHECK-WITH: invoke void @destroy(i8** [[PTR]])
- // CHECK-WITH: call i8* @llvm.eh.exception()
- // CHECK-WITH-NEXT: @llvm.eh.selector
+ // CHECK-WITH: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gcc_personality_v0 to i8*)
+ // CHECK-WITH-NEXT: catch i8* null
// CHECK-WITH-NEXT: call void @objc_terminate()
// CHECK-WITHOUT: define void @test0()
@@ -23,7 +23,7 @@ void test0(void) {
// CHECK-WITHOUT: call void @destroy(i8** [[PTR]])
// CHECK-WITHOUT-NEXT: ret void
// CHECK-WITHOUT: invoke void @destroy(i8** [[PTR]])
- // CHECK-WITHOUT: call i8* @llvm.eh.exception()
- // CHECK-WITHOUT-NEXT: @llvm.eh.selector
+ // CHECK-WITHOUT: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gcc_personality_v0 to i8*)
+ // CHECK-WITHOUT-NEXT: catch i8* null
// CHECK-WITHOUT-NEXT: call void @abort()
}
OpenPOWER on IntegriCloud