diff options
author | John McCall <rjmccall@apple.com> | 2013-02-12 03:51:46 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2013-02-12 03:51:46 +0000 |
commit | e142ad50f1ed0f5d1a38432dd88790a51ad9e727 (patch) | |
tree | dfdb143d96cd434a6a2b9f417f5d51f7a35b2c86 /clang/test/CodeGenCXX/exceptions.cpp | |
parent | 2c33ba8caef144835edcd4fcb9e63f2dd5912de4 (diff) | |
download | bcm5719-llvm-e142ad50f1ed0f5d1a38432dd88790a51ad9e727.tar.gz bcm5719-llvm-e142ad50f1ed0f5d1a38432dd88790a51ad9e727.zip |
Call __cxa_begin_catch with the current exception before
calling std::terminate(). rdar://11904428
llvm-svn: 174940
Diffstat (limited to 'clang/test/CodeGenCXX/exceptions.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/exceptions.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/clang/test/CodeGenCXX/exceptions.cpp b/clang/test/CodeGenCXX/exceptions.cpp index 06003c0cd66..f9727282c55 100644 --- a/clang/test/CodeGenCXX/exceptions.cpp +++ b/clang/test/CodeGenCXX/exceptions.cpp @@ -69,6 +69,13 @@ namespace test1 { return new A(B().x); } + // rdar://11904428 + // Terminate landing pads should call __cxa_begin_catch first. + // CHECK: define linkonce_odr hidden void @__clang_call_terminate(i8*) noinline noreturn nounwind + // CHECK-NEXT: [[T0:%.*]] = call i8* @__cxa_begin_catch(i8* %0) nounwind + // CHECK-NEXT: call void @_ZSt9terminatev() noreturn nounwind + // CHECK-NEXT: unreachable + A *d() { // CHECK: define [[A:%.*]]* @_ZN5test11dEv() // CHECK: [[ACTIVE:%.*]] = alloca i1 @@ -157,7 +164,7 @@ namespace test2 { // CHECK-NEXT: invoke void @_ZN5test21AC1Ei([[A]]* [[CAST]], i32 5) // CHECK: ret [[A]]* [[CAST]] // CHECK: invoke void @_ZN5test21AdlEPvm(i8* [[NEW]], i64 8) - // CHECK: call void @_ZSt9terminatev() + // CHECK: call void @__clang_call_terminate(i8* {{%.*}}) noreturn nounwind return new A(5); } } @@ -183,7 +190,7 @@ namespace test3 { // CHECK-NEXT: invoke void @_ZN5test31AC1Ei([[A]]* [[CAST]], i32 5) // CHECK: ret [[A]]* [[CAST]] // CHECK: invoke void @_ZN5test31AdlEPvS1_d(i8* [[NEW]], i8* [[FOO]], double [[BAR]]) - // CHECK: call void @_ZSt9terminatev() + // CHECK: call void @__clang_call_terminate(i8* {{%.*}}) noreturn nounwind return new(foo(),bar()) A(5); } |