aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/exceptions.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-11-10 10:43:54 +0000
committerJohn McCall <rjmccall@apple.com>2011-11-10 10:43:54 +0000
commit6f103ba42cb69d50005a977c5ea583984ab63fc4 (patch)
treeebadb2d10dc505112b39803e795db603c221e178 /test/CodeGenCXX/exceptions.cpp
parent3fe0aad1a6f692f691b8f953a7d079f49dfac314 (diff)
Whenever explicitly activating or deactivating a cleanup, we
need to provide a 'dominating IP' which is guaranteed to dominate the (de)activation point but which cannot be avoided along any execution path from the (de)activation point to the push-point of the cleanup. Using the entry block is bad mojo. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144276 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/exceptions.cpp')
-rw-r--r--test/CodeGenCXX/exceptions.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/test/CodeGenCXX/exceptions.cpp b/test/CodeGenCXX/exceptions.cpp
index 0fbb09c262..2a5cbb4900 100644
--- a/test/CodeGenCXX/exceptions.cpp
+++ b/test/CodeGenCXX/exceptions.cpp
@@ -53,8 +53,8 @@ namespace test1 {
A *c() {
// CHECK: define [[A:%.*]]* @_ZN5test11cEv()
// CHECK: [[ACTIVE:%.*]] = alloca i1
- // CHECK-NEXT: store i1 true, i1* [[ACTIVE]]
// CHECK-NEXT: [[NEW:%.*]] = call noalias i8* @_Znwm(i64 8)
+ // CHECK-NEXT: store i1 true, i1* [[ACTIVE]]
// CHECK-NEXT: [[CAST:%.*]] = bitcast i8* [[NEW]] to [[A]]*
// CHECK-NEXT: invoke void @_ZN5test11BC1Ev([[B:%.*]]* [[T0:%.*]])
// CHECK: [[T1:%.*]] = getelementptr inbounds [[B]]* [[T0]], i32 0, i32 0
@@ -72,8 +72,8 @@ namespace test1 {
A *d() {
// CHECK: define [[A:%.*]]* @_ZN5test11dEv()
// CHECK: [[ACTIVE:%.*]] = alloca i1
- // CHECK-NEXT: store i1 true, i1* [[ACTIVE]]
// CHECK-NEXT: [[NEW:%.*]] = call noalias i8* @_Znwm(i64 8)
+ // CHECK-NEXT: store i1 true, i1* [[ACTIVE]]
// CHECK-NEXT: [[CAST:%.*]] = bitcast i8* [[NEW]] to [[A]]*
// CHECK-NEXT: invoke void @_ZN5test11BC1Ev([[B:%.*]]* [[T0:%.*]])
// CHECK: [[T1:%.*]] = invoke i32 @_ZN5test11BcviEv([[B]]* [[T0]])
@@ -90,8 +90,8 @@ namespace test1 {
A *e() {
// CHECK: define [[A:%.*]]* @_ZN5test11eEv()
// CHECK: [[ACTIVE:%.*]] = alloca i1
- // CHECK-NEXT: store i1 true, i1* [[ACTIVE]]
// CHECK-NEXT: [[NEW:%.*]] = call noalias i8* @_Znwm(i64 8)
+ // CHECK-NEXT: store i1 true, i1* [[ACTIVE]]
// CHECK-NEXT: [[CAST:%.*]] = bitcast i8* [[NEW]] to [[A]]*
// CHECK-NEXT: invoke void @_ZN5test11BC1Ev([[B:%.*]]* [[T0:%.*]])
// CHECK: [[T1:%.*]] = invoke i32 @_ZN5test11BcviEv([[B]]* [[T0]])
@@ -121,8 +121,8 @@ namespace test1 {
// CHECK: define [[A:%.*]]* @_ZN5test11iEv()
// CHECK: [[X:%.*]] = alloca [[A]]*, align 8
// CHECK: [[ACTIVE:%.*]] = alloca i1
- // CHECK: store i1 true, i1* [[ACTIVE]]
- // CHECK-NEXT: [[NEW:%.*]] = call noalias i8* @_Znwm(i64 8)
+ // CHECK: [[NEW:%.*]] = call noalias i8* @_Znwm(i64 8)
+ // CHECK-NEXT: store i1 true, i1* [[ACTIVE]]
// CHECK-NEXT: [[CAST:%.*]] = bitcast i8* [[NEW]] to [[A]]*
// CHECK-NEXT: invoke void @_ZN5test15makeBEv([[B:%.*]]* sret [[T0:%.*]])
// CHECK: [[T1:%.*]] = invoke i32 @_ZN5test11BcviEv([[B]]* [[T0]])
@@ -196,9 +196,9 @@ namespace test3 {
// CHECK-NEXT: [[CLEANUPACTIVE:%.*]] = alloca i1
// CHECK-NEXT: [[TMP:%.*]] = alloca [[A]], align 8
// CHECK: [[TMPACTIVE:%.*]] = alloca i1
- // CHECK-NEXT: store i1 false, i1* [[CLEANUPACTIVE]]
// CHECK: [[COND:%.*]] = trunc i8 {{.*}} to i1
+ // CHECK-NEXT: store i1 false, i1* [[CLEANUPACTIVE]]
// CHECK-NEXT: store i1 false, i1* [[TMPACTIVE]]
// CHECK-NEXT: br i1 [[COND]]
return (cond ?
@@ -330,17 +330,15 @@ namespace test7 {
// CHECK-NEXT: alloca [[A]]
// CHECK-NEXT: [[INNER_A:%.*]] = alloca i1
- // These entry-block stores are to deactivate the delete cleanups.
- // CHECK-NEXT: store i1 false, i1* [[INNER_NEW]]
- // CHECK-NEXT: store i1 false, i1* [[OUTER_NEW]]
-
// Allocate the outer object.
// CHECK-NEXT: [[NEW:%.*]] = call i8* @_ZN5test71BnwEm(
// CHECK-NEXT: icmp eq i8* [[NEW]], null
// These stores, emitted before the outermost conditional branch,
// deactivate the temporary cleanups.
+ // CHECK-NEXT: store i1 false, i1* [[OUTER_NEW]]
// CHECK-NEXT: store i1 false, i1* [[OUTER_A]]
+ // CHECK-NEXT: store i1 false, i1* [[INNER_NEW]]
// CHECK-NEXT: store i1 false, i1* [[INNER_A]]
// CHECK-NEXT: br i1