aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/partial-destruction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/partial-destruction.cpp')
-rw-r--r--test/CodeGenCXX/partial-destruction.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/test/CodeGenCXX/partial-destruction.cpp b/test/CodeGenCXX/partial-destruction.cpp
index 82deca06cf80..f232a159eda5 100644
--- a/test/CodeGenCXX/partial-destruction.cpp
+++ b/test/CodeGenCXX/partial-destruction.cpp
@@ -16,7 +16,6 @@ namespace test0 {
// CHECK-NEXT: [[ENDVAR:%.*]] = alloca [[A]]*
// CHECK-NEXT: [[EXN:%.*]] = alloca i8*
// CHECK-NEXT: [[SEL:%.*]] = alloca i32
- // CHECK-NEXT: [[CLEANUP:%.*]] = alloca i32
// Initialize.
// CHECK-NEXT: [[E_BEGIN:%.*]] = getelementptr inbounds [10 x [[A]]]* [[AS]], i64 0, i64 0
@@ -51,7 +50,8 @@ namespace test0 {
// CHECK: ret void
// Partial destroy for initialization.
- // CHECK: llvm.eh.selector({{.*}}, i32 0)
+ // CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ // CHECK-NEXT: cleanup
// CHECK: [[PARTIAL_END:%.*]] = load [[A]]** [[ENDVAR]]
// CHECK-NEXT: [[T0:%.*]] = icmp eq [[A]]* [[E_BEGIN]], [[PARTIAL_END]]
// CHECK-NEXT: br i1 [[T0]],
@@ -62,7 +62,8 @@ namespace test0 {
// CHECK-NEXT: br i1 [[T0]],
// Primary EH destructor.
- // CHECK: llvm.eh.selector({{.*}}, i32 0)
+ // CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ // CHECK-NEXT: cleanup
// CHECK: [[E0:%.*]] = getelementptr inbounds [10 x [[A]]]* [[AS]], i32 0, i32 0
// CHECK-NEXT: [[E_END:%.*]] = getelementptr inbounds [[A]]* [[E0]], i64 10
// CHECK-NEXT: br label
@@ -71,7 +72,8 @@ namespace test0 {
// FIXME: There's some really bad block ordering here which causes
// the partial destroy for the primary normal destructor to fall
// within the primary EH destructor.
- // CHECK: llvm.eh.selector({{.*}}, i32 0)
+ // CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ // CHECK-NEXT: cleanup
// CHECK: [[T0:%.*]] = icmp eq [[A]]* [[ED_BEGIN]], [[ED_CUR]]
// CHECK-NEXT: br i1 [[T0]]
// CHECK: [[EDD_AFTER:%.*]] = phi [[A]]* [ [[ED_CUR]], {{%.*}} ], [ [[EDD_CUR:%.*]], {{%.*}} ]
@@ -100,7 +102,6 @@ namespace test1 {
// CHECK: [[V:%.*]] = alloca [[B:%.*]], align 4
// CHECK-NEXT: alloca i8*
// CHECK-NEXT: alloca i32
- // CHECK-NEXT: alloca i32
// CHECK-NEXT: [[X:%.*]] = getelementptr inbounds [[B]]* [[V]], i32 0, i32 0
// CHECK-NEXT: call void @_ZN5test11AC1Ei([[A:%.*]]* [[X]], i32 5)
// CHECK-NEXT: [[Y:%.*]] = getelementptr inbounds [[B]]* [[V]], i32 0, i32 1
@@ -113,8 +114,10 @@ namespace test1 {
// CHECK-NEXT: ret void
// FIXME: again, the block ordering is pretty bad here
- // CHECK: eh.selector({{.*}}, i32 0)
- // CHECK: eh.selector({{.*}}, i32 0)
+ // CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ // CHECK-NEXT: cleanup
+ // CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ // CHECK-NEXT: cleanup
// CHECK: invoke void @_ZN5test11AD1Ev([[A]]* [[Y]])
// CHECK: invoke void @_ZN5test11AD1Ev([[A]]* [[X]])
}
@@ -129,7 +132,6 @@ namespace test2 {
// CHECK: [[V:%.*]] = alloca [4 x [7 x [[A:%.*]]]], align 1
// CHECK-NEXT: alloca i8*
// CHECK-NEXT: alloca i32
- // CHECK-NEXT: alloca i32
// Main initialization loop.
// CHECK-NEXT: [[BEGIN:%.*]] = getelementptr inbounds [4 x [7 x [[A]]]]* [[V]], i32 0, i32 0, i32 0
@@ -142,7 +144,8 @@ namespace test2 {
// CHECK-NEXT: br i1 [[DONE]],
// Partial destruction landing pad.
- // CHECK: llvm.eh.exception()
+ // CHECK: landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+ // CHECK-NEXT: cleanup
// CHECK: [[EMPTY:%.*]] = icmp eq [[A]]* [[BEGIN]], [[CUR]]
// CHECK-NEXT: br i1 [[EMPTY]],
// CHECK: [[PAST:%.*]] = phi [[A]]* [ [[CUR]], {{%.*}} ], [ [[DEL:%.*]], {{%.*}} ]