From: Paul Robinson Date: Tue, 20 Dec 2016 22:26:11 +0000 (+0000) Subject: C++11 test cleanup: nonthrowing destructors X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c00ee55cc8dd26291d4a87ff5b30471026417bc5;p=clang C++11 test cleanup: nonthrowing destructors If a dtor has no interesting members, then it ends up being nothrow, which affects the generated IR. Modify some tests to tolerate this difference between C++03 and C++11. Differential Revision: http://reviews.llvm.org/D27936 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290207 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGenCXX/destructors.cpp b/test/CodeGenCXX/destructors.cpp index d6aabee58b..3a88e66cce 100644 --- a/test/CodeGenCXX/destructors.cpp +++ b/test/CodeGenCXX/destructors.cpp @@ -1,11 +1,16 @@ -// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - -mconstructor-aliases -fcxx-exceptions -fexceptions -O1 -disable-llvm-optzns > %t +// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - -mconstructor-aliases -fcxx-exceptions -fexceptions -O1 -disable-llvm-optzns -std=c++03 > %t // RUN: FileCheck --check-prefix=CHECK1 --input-file=%t %s // RUN: FileCheck --check-prefix=CHECK2 --input-file=%t %s // RUN: FileCheck --check-prefix=CHECK3 --input-file=%t %s -// RUN: FileCheck --check-prefix=CHECK4 --input-file=%t %s -// RUN: FileCheck --check-prefix=CHECK5 --input-file=%t %s -// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions -O1 -disable-llvm-optzns -std=c++11 > %t2 -// RUN: FileCheck --check-prefix=CHECK6 --input-file=%t2 %s +// RUN: FileCheck --check-prefixes=CHECK4,CHECK4v03 --input-file=%t %s +// RUN: FileCheck --check-prefixes=CHECK5,CHECK5v03 --input-file=%t %s +// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - -mconstructor-aliases -fcxx-exceptions -fexceptions -O1 -disable-llvm-optzns -std=c++11 > %t2 +// RUN: FileCheck --check-prefix=CHECK1 --input-file=%t2 %s +// RUN: FileCheck --check-prefix=CHECK2v11 --input-file=%t2 %s +// RUN: FileCheck --check-prefix=CHECK3 --input-file=%t2 %s +// RUN: FileCheck --check-prefixes=CHECK4,CHECK4v11 --input-file=%t2 %s +// RUN: FileCheck --check-prefixes=CHECK5,CHECK5v11 --input-file=%t2 %s +// RUN: FileCheck --check-prefix=CHECK6 --input-file=%t2 %s // REQUIRES: asserts struct A { @@ -98,6 +103,12 @@ namespace test0 { // CHECK2: invoke void @_ZN5test04BaseD2Ev // CHECK2: unwind label [[BASE_UNWIND:%[a-zA-Z0-9.]+]] +// In C++11, the destructors are often known not to throw. +// CHECK2v11-LABEL: @_ZN5test01AD1Ev = alias {{.*}} @_ZN5test01AD2Ev +// CHECK2v11-LABEL: define void @_ZN5test01AD2Ev(%"struct.test0::A"* %this) unnamed_addr +// CHECK2v11: call void @_ZN5test06MemberD1Ev +// CHECK2v11: call void @_ZN5test04BaseD2Ev + struct B : Base, virtual VBase { Member M; ~B(); @@ -111,6 +122,10 @@ namespace test0 { // CHECK2: invoke void @_ZN5test04BaseD2Ev // CHECK2: unwind label [[BASE_UNWIND:%[a-zA-Z0-9.]+]] +// CHECK2v11-LABEL: define void @_ZN5test01BD2Ev(%"struct.test0::B"* %this, i8** %vtt) unnamed_addr +// CHECK2v11: call void @_ZN5test06MemberD1Ev +// CHECK2v11: call void @_ZN5test04BaseD2Ev + // CHECK2-LABEL: define void @_ZN5test01BD1Ev(%"struct.test0::B"* %this) unnamed_addr // CHECK2: invoke void @_ZN5test06MemberD1Ev // CHECK2: unwind label [[MEM_UNWIND:%[a-zA-Z0-9.]+]] @@ -118,6 +133,11 @@ namespace test0 { // CHECK2: unwind label [[BASE_UNWIND:%[a-zA-Z0-9.]+]] // CHECK2: invoke void @_ZN5test05VBaseD2Ev // CHECK2: unwind label [[VBASE_UNWIND:%[a-zA-Z0-9.]+]] + +// CHECK2v11-LABEL: define void @_ZN5test01BD1Ev(%"struct.test0::B"* %this) unnamed_addr +// CHECK2v11: call void @_ZN5test06MemberD1Ev +// CHECK2v11: call void @_ZN5test04BaseD2Ev +// CHECK2v11: call void @_ZN5test05VBaseD2Ev } // Test base-class aliasing. @@ -189,19 +209,22 @@ namespace test3 { } // CHECK4-LABEL: define internal void @_ZN5test312_GLOBAL__N_11CD2Ev(%"struct.test3::(anonymous namespace)::C"* %this) unnamed_addr - // CHECK4: invoke void @_ZN5test31BD2Ev( + // CHECK4v03: invoke void @_ZN5test31BD2Ev( + // CHECK4v11: call void @_ZN5test31BD2Ev( // CHECK4: call void @_ZN5test31AD2Ev( // CHECK4: ret void // CHECK4-LABEL: define internal void @_ZN5test312_GLOBAL__N_11DD0Ev(%"struct.test3::(anonymous namespace)::D"* %this) unnamed_addr - // CHECK4-SAME: personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) - // CHECK4: invoke void {{.*}} @_ZN5test312_GLOBAL__N_11CD2Ev + // CHECK4v03-SAME: personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + // CHECK4v03: invoke void {{.*}} @_ZN5test312_GLOBAL__N_11CD2Ev + // CHECK4v11: call void {{.*}} @_ZN5test312_GLOBAL__N_11CD2Ev // CHECK4: call void @_ZdlPv({{.*}}) [[NUW:#[0-9]+]] // CHECK4: ret void - // CHECK4: landingpad { i8*, i32 } - // CHECK4-NEXT: cleanup - // CHECK4: call void @_ZdlPv({{.*}}) [[NUW]] - // CHECK4: resume { i8*, i32 } + // CHECK4v03: landingpad { i8*, i32 } + // CHECK4v03-NEXT: cleanup + // CHECK4v03: call void @_ZdlPv({{.*}}) [[NUW]] + // CHECK4v03: resume { i8*, i32 } + // CHECK4v11-NOT: landingpad // CHECK4-LABEL: define internal void @_ZThn8_N5test312_GLOBAL__N_11DD1Ev( // CHECK4: getelementptr inbounds i8, i8* {{.*}}, i64 -8 @@ -214,14 +237,15 @@ namespace test3 { // CHECK4: ret void // CHECK4-LABEL: define internal void @_ZN5test312_GLOBAL__N_11CD0Ev(%"struct.test3::(anonymous namespace)::C"* %this) unnamed_addr - // CHECK4-SAME: personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) - // CHECK4: invoke void @_ZN5test312_GLOBAL__N_11CD2Ev( + // CHECK4v03-SAME: personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) + // CHECK4v03: invoke void @_ZN5test312_GLOBAL__N_11CD2Ev( + // CHECK4v11: call void @_ZN5test312_GLOBAL__N_11CD2Ev( // CHECK4: call void @_ZdlPv({{.*}}) [[NUW]] // CHECK4: ret void - // CHECK4: landingpad { i8*, i32 } - // CHECK4-NEXT: cleanup - // CHECK4: call void @_ZdlPv({{.*}}) [[NUW]] - // CHECK4: resume { i8*, i32 } + // CHECK4v03: landingpad { i8*, i32 } + // CHECK4v03-NEXT: cleanup + // CHECK4v03: call void @_ZdlPv({{.*}}) [[NUW]] + // CHECK4v03: resume { i8*, i32 } // CHECK4-LABEL: define internal void @_ZThn8_N5test312_GLOBAL__N_11CD1Ev( // CHECK4: getelementptr inbounds i8, i8* {{.*}}, i64 -8 @@ -282,8 +306,8 @@ namespace test5 { // CHECK5-LABEL: define void @_ZN5test53fooEv() // CHECK5: [[ELEMS:%.*]] = alloca [5 x [[A:%.*]]], align - // CHECK5-NEXT: [[EXN:%.*]] = alloca i8* - // CHECK5-NEXT: [[SEL:%.*]] = alloca i32 + // CHECK5v03-NEXT: [[EXN:%.*]] = alloca i8* + // CHECK5v03-NEXT: [[SEL:%.*]] = alloca i32 // CHECK5-NEXT: [[PELEMS:%.*]] = bitcast [5 x [[A]]]* [[ELEMS]] to i8* // CHECK5-NEXT: call void @llvm.lifetime.start(i64 5, i8* [[PELEMS]]) // CHECK5-NEXT: [[BEGIN:%.*]] = getelementptr inbounds [5 x [[A]]], [5 x [[A]]]* [[ELEMS]], i32 0, i32 0 @@ -291,19 +315,22 @@ namespace test5 { // CHECK5-NEXT: br label // CHECK5: [[POST:%.*]] = phi [[A]]* [ [[END]], {{%.*}} ], [ [[ELT:%.*]], {{%.*}} ] // CHECK5-NEXT: [[ELT]] = getelementptr inbounds [[A]], [[A]]* [[POST]], i64 -1 - // CHECK5-NEXT: invoke void @_ZN5test51AD1Ev([[A]]* [[ELT]]) + // CHECK5v03-NEXT: invoke void @_ZN5test51AD1Ev([[A]]* [[ELT]]) + // CHECK5v11-NEXT: call void @_ZN5test51AD1Ev([[A]]* [[ELT]]) // CHECK5: [[T0:%.*]] = icmp eq [[A]]* [[ELT]], [[BEGIN]] // CHECK5-NEXT: br i1 [[T0]], // CHECK5: call void @llvm.lifetime.end // CHECK5-NEXT: ret void // lpad - // CHECK5: [[EMPTY:%.*]] = icmp eq [[A]]* [[BEGIN]], [[ELT]] - // CHECK5-NEXT: br i1 [[EMPTY]] - // CHECK5: [[AFTER:%.*]] = phi [[A]]* [ [[ELT]], {{%.*}} ], [ [[CUR:%.*]], {{%.*}} ] - // CHECK5-NEXT: [[CUR:%.*]] = getelementptr inbounds [[A]], [[A]]* [[AFTER]], i64 -1 - // CHECK5-NEXT: invoke void @_ZN5test51AD1Ev([[A]]* [[CUR]]) - // CHECK5: [[DONE:%.*]] = icmp eq [[A]]* [[CUR]], [[BEGIN]] - // CHECK5-NEXT: br i1 [[DONE]], + // CHECK5v03: [[EMPTY:%.*]] = icmp eq [[A]]* [[BEGIN]], [[ELT]] + // CHECK5v03-NEXT: br i1 [[EMPTY]] + // CHECK5v03: [[AFTER:%.*]] = phi [[A]]* [ [[ELT]], {{%.*}} ], [ [[CUR:%.*]], {{%.*}} ] + // CHECK5v03-NEXT: [[CUR:%.*]] = getelementptr inbounds [[A]], [[A]]* [[AFTER]], i64 -1 + // CHECK5v03-NEXT: invoke void @_ZN5test51AD1Ev([[A]]* [[CUR]]) + // CHECK5v03: [[DONE:%.*]] = icmp eq [[A]]* [[CUR]], [[BEGIN]] + // CHECK5v03-NEXT: br i1 [[DONE]], + // CHECK5v11-NOT: landingpad + // CHECK5v11: } void foo() { A elems[5]; } @@ -334,25 +361,34 @@ namespace test6 { C::~C() { opaque(); } // CHECK5-LABEL: define void @_ZN5test61CD2Ev(%"struct.test6::C"* %this, i8** %vtt) unnamed_addr // CHECK5: invoke void @_ZN5test66opaqueEv - // CHECK5: invoke void @_ZN5test61AD1Ev - // CHECK5: invoke void @_ZN5test61AD1Ev - // CHECK5: invoke void @_ZN5test61AD1Ev - // CHECK5: invoke void @_ZN5test61BILj1EED2Ev + // CHECK5v03: invoke void @_ZN5test61AD1Ev + // CHECK5v03: invoke void @_ZN5test61AD1Ev + // CHECK5v03: invoke void @_ZN5test61AD1Ev + // CHECK5v03: invoke void @_ZN5test61BILj1EED2Ev + // CHECK5v11: call void @_ZN5test61AD1Ev + // CHECK5v11: call void @_ZN5test61AD1Ev + // CHECK5v11: call void @_ZN5test61AD1Ev + // CHECK5v11: call void @_ZN5test61BILj1EED2Ev // CHECK5: call void @_ZN5test61BILj0EED2Ev // CHECK5: ret void - // CHECK5: invoke void @_ZN5test61AD1Ev - // CHECK5: invoke void @_ZN5test61AD1Ev - // CHECK5: invoke void @_ZN5test61AD1Ev - // CHECK5: invoke void @_ZN5test61BILj1EED2Ev - // CHECK5: invoke void @_ZN5test61BILj0EED2Ev + // CHECK5v03: invoke void @_ZN5test61AD1Ev + // CHECK5v03: invoke void @_ZN5test61AD1Ev + // CHECK5v03: invoke void @_ZN5test61AD1Ev + // CHECK5v03: invoke void @_ZN5test61BILj1EED2Ev + // CHECK5v03: invoke void @_ZN5test61BILj0EED2Ev // CHECK5-LABEL: define void @_ZN5test61CD1Ev(%"struct.test6::C"* %this) unnamed_addr - // CHECK5: invoke void @_ZN5test61CD2Ev - // CHECK5: invoke void @_ZN5test61BILj3EED2Ev - // CHECK5: call void @_ZN5test61BILj2EED2Ev - // CHECK5: ret void - // CHECK5: invoke void @_ZN5test61BILj3EED2Ev - // CHECK5: invoke void @_ZN5test61BILj2EED2Ev + // CHECK5v03: invoke void @_ZN5test61CD2Ev + // CHECK5v03: invoke void @_ZN5test61BILj3EED2Ev + // CHECK5v03: call void @_ZN5test61BILj2EED2Ev + // CHECK5v03: ret void + // CHECK5v03: invoke void @_ZN5test61BILj3EED2Ev + // CHECK5v03: invoke void @_ZN5test61BILj2EED2Ev + + // CHECK5v11: call void @_ZN5test61CD2Ev + // CHECK5v11: call void @_ZN5test61BILj3EED2Ev + // CHECK5v11: call void @_ZN5test61BILj2EED2Ev + // CHECK5v11: ret void } // PR 9197 @@ -369,7 +405,8 @@ namespace test7 { // Verify that this doesn't get emitted as an alias // CHECK5-LABEL: define void @_ZN5test71BD2Ev( - // CHECK5: invoke void @_ZN5test71DD1Ev( + // CHECK5v03: invoke void @_ZN5test71DD1Ev( + // CHECK5v11: call void @_ZN5test71DD1Ev( // CHECK5: call void @_ZN5test71AD2Ev( B::~B() {} } @@ -394,7 +431,8 @@ namespace test8 { // CHECK5: call void @_ZN5test81AC1Ev([[A]]* [[X]]) // CHECK5-NEXT: br label // CHECK5: invoke void @_ZN5test81AC1Ev([[A]]* [[Y]]) - // CHECK5: invoke void @_ZN5test81AD1Ev([[A]]* [[Y]]) + // CHECK5v03: invoke void @_ZN5test81AD1Ev([[A]]* [[Y]]) + // CHECK5v11: call void @_ZN5test81AD1Ev([[A]]* [[Y]]) // CHECK5-NOT: switch // CHECK5: invoke void @_ZN5test83dieEv() // CHECK5: unreachable diff --git a/test/CodeGenCXX/nrvo.cpp b/test/CodeGenCXX/nrvo.cpp index d8e5b13465..d02206abae 100644 --- a/test/CodeGenCXX/nrvo.cpp +++ b/test/CodeGenCXX/nrvo.cpp @@ -1,5 +1,6 @@ // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -O1 -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -O1 -fcxx-exceptions -fexceptions -o - %s | FileCheck --check-prefix=CHECK-EH %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -O1 -fcxx-exceptions -fexceptions -std=c++03 -o - %s | FileCheck --check-prefixes=CHECK-EH,CHECK-EH-03 %s +// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -O1 -fcxx-exceptions -fexceptions -std=c++11 -o - %s | FileCheck --check-prefixes=CHECK-EH,CHECK-EH-11 %s // Test code generation for the named return value optimization. class X { @@ -91,16 +92,18 @@ X test2(bool B) { // -> %eh.cleanup // %lpad1: landing pad for return copy ctors, EH cleanup for 'y' - // CHECK-EH: invoke {{.*}} @_ZN1XD1Ev + // CHECK-EH-03: invoke {{.*}} @_ZN1XD1Ev // -> %eh.cleanup, %terminate.lpad + // CHECK-EH-11: call {{.*}} @_ZN1XD1Ev // %if.end: returning 'y' // CHECK-EH: invoke {{.*}} @_ZN1XC1ERKS_ // -> %cleanup, %lpad1 // %cleanup: normal cleanup for 'y' - // CHECK-EH: invoke {{.*}} @_ZN1XD1Ev + // CHECK-EH-03: invoke {{.*}} @_ZN1XD1Ev // -> %invoke.cont11, %lpad + // CHECK-EH-11: call {{.*}} @_ZN1XD1Ev // %invoke.cont11: normal cleanup for 'x' // CHECK-EH: call void @llvm.lifetime.end @@ -109,19 +112,20 @@ X test2(bool B) { // CHECK-EH-NEXT: ret void // %eh.cleanup: EH cleanup for 'x' - // CHECK-EH: invoke {{.*}} @_ZN1XD1Ev + // CHECK-EH-03: invoke {{.*}} @_ZN1XD1Ev // -> %invoke.cont17, %terminate.lpad + // CHECK-EH-11: call {{.*}} @_ZN1XD1Ev // %invoke.cont17: rethrow block for %eh.cleanup. // This really should be elsewhere in the function. // CHECK-EH: resume { i8*, i32 } // %terminate.lpad: terminate landing pad. - // CHECK-EH: [[T0:%.*]] = landingpad { i8*, i32 } - // CHECK-EH-NEXT: catch i8* null - // CHECK-EH-NEXT: [[T1:%.*]] = extractvalue { i8*, i32 } [[T0]], 0 - // CHECK-EH-NEXT: call void @__clang_call_terminate(i8* [[T1]]) [[NR_NUW:#[0-9]+]] - // CHECK-EH-NEXT: unreachable + // CHECK-EH-03: [[T0:%.*]] = landingpad { i8*, i32 } + // CHECK-EH-03-NEXT: catch i8* null + // CHECK-EH-03-NEXT: [[T1:%.*]] = extractvalue { i8*, i32 } [[T0]], 0 + // CHECK-EH-03-NEXT: call void @__clang_call_terminate(i8* [[T1]]) [[NR_NUW:#[0-9]+]] + // CHECK-EH-03-NEXT: unreachable } @@ -217,4 +221,4 @@ Y test9() { // CHECK-LABEL: define linkonce_odr void @_ZN1YIiE1fEv // CHECK: tail call {{.*}} @_ZN1YIiEC1Ev -// CHECK-EH: attributes [[NR_NUW]] = { noreturn nounwind } +// CHECK-EH-03: attributes [[NR_NUW]] = { noreturn nounwind } diff --git a/test/CodeGenCXX/partial-destruction.cpp b/test/CodeGenCXX/partial-destruction.cpp index 4097fbfaa1..a5a2f40eb0 100644 --- a/test/CodeGenCXX/partial-destruction.cpp +++ b/test/CodeGenCXX/partial-destruction.cpp @@ -1,4 +1,5 @@ -// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions | FileCheck %s +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions -std=c++03 | FileCheck %s -check-prefixes=CHECK,CHECKv03 +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions -std=c++11 | FileCheck %s -check-prefixes=CHECK,CHECKv11 // Test IR generation for partial destruction of aggregates. @@ -45,7 +46,8 @@ namespace test0 { // CHECK-NEXT: br label // CHECK: [[ED_AFTER:%.*]] = phi [[A]]* [ [[ED_END]], {{%.*}} ], [ [[ED_CUR:%.*]], {{%.*}} ] // CHECK-NEXT: [[ED_CUR]] = getelementptr inbounds [[A]], [[A]]* [[ED_AFTER]], i64 -1 - // CHECK-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* [[ED_CUR]]) + // CHECKv03-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* [[ED_CUR]]) + // CHECKv11-NEXT: call void @_ZN5test01AD1Ev([[A]]* [[ED_CUR]]) // CHECK: [[T0:%.*]] = icmp eq [[A]]* [[ED_CUR]], [[ED_BEGIN]] // CHECK-NEXT: br i1 [[T0]], // CHECK: ret void @@ -58,7 +60,8 @@ namespace test0 { // CHECK-NEXT: br i1 [[T0]], // CHECK: [[E_AFTER:%.*]] = phi [[A]]* [ [[PARTIAL_END]], {{%.*}} ], [ [[E_CUR:%.*]], {{%.*}} ] // CHECK-NEXT: [[E_CUR]] = getelementptr inbounds [[A]], [[A]]* [[E_AFTER]], i64 -1 - // CHECK-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* [[E_CUR]]) + // CHECKv03-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* [[E_CUR]]) + // CHECKv11-NEXT: call void @_ZN5test01AD1Ev([[A]]* [[E_CUR]]) // CHECK: [[T0:%.*]] = icmp eq [[A]]* [[E_CUR]], [[E_BEGIN]] // CHECK-NEXT: br i1 [[T0]], @@ -73,20 +76,21 @@ 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: landingpad { i8*, i32 } - // 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:%.*]], {{%.*}} ] - // CHECK-NEXT: [[EDD_CUR]] = getelementptr inbounds [[A]], [[A]]* [[EDD_AFTER]], i64 -1 - // CHECK-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* [[EDD_CUR]]) - // CHECK: [[T0:%.*]] = icmp eq [[A]]* [[EDD_CUR]], [[ED_BEGIN]] - // CHECK-NEXT: br i1 [[T0]] + // CHECKv03: landingpad { i8*, i32 } + // CHECKv03-NEXT: cleanup + // CHECKv03: [[T0:%.*]] = icmp eq [[A]]* [[ED_BEGIN]], [[ED_CUR]] + // CHECKv03-NEXT: br i1 [[T0]] + // CHECKv03: [[EDD_AFTER:%.*]] = phi [[A]]* [ [[ED_CUR]], {{%.*}} ], [ [[EDD_CUR:%.*]], {{%.*}} ] + // CHECKv03-NEXT: [[EDD_CUR]] = getelementptr inbounds [[A]], [[A]]* [[EDD_AFTER]], i64 -1 + // CHECKv03-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* [[EDD_CUR]]) + // CHECKv03: [[T0:%.*]] = icmp eq [[A]]* [[EDD_CUR]], [[ED_BEGIN]] + // CHECKv03-NEXT: br i1 [[T0]] // Back to the primary EH destructor. // CHECK: [[E_AFTER:%.*]] = phi [[A]]* [ [[E_END]], {{%.*}} ], [ [[E_CUR:%.*]], {{%.*}} ] // CHECK-NEXT: [[E_CUR]] = getelementptr inbounds [[A]], [[A]]* [[E_AFTER]], i64 -1 - // CHECK-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* [[E_CUR]]) + // CHECKv03-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* [[E_CUR]]) + // CHECKv11-NEXT: call void @_ZN5test01AD1Ev([[A]]* [[E_CUR]]) // CHECK: [[T0:%.*]] = icmp eq [[A]]* [[E_CUR]], [[E0]] // CHECK-NEXT: br i1 [[T0]], @@ -120,8 +124,10 @@ namespace test1 { // CHECK-NEXT: cleanup // CHECK: landingpad { i8*, i32 } // CHECK-NEXT: cleanup - // CHECK: invoke void @_ZN5test11AD1Ev([[A]]* [[Y]]) - // CHECK: invoke void @_ZN5test11AD1Ev([[A]]* [[X]]) + // CHECKv03: invoke void @_ZN5test11AD1Ev([[A]]* [[Y]]) + // CHECKv03: invoke void @_ZN5test11AD1Ev([[A]]* [[X]]) + // CHECKv11: call void @_ZN5test11AD1Ev([[A]]* [[Y]]) + // CHECKv11: call void @_ZN5test11AD1Ev([[A]]* [[X]]) } namespace test2 { @@ -153,7 +159,8 @@ namespace test2 { // CHECK-NEXT: br i1 [[EMPTY]], // CHECK: [[PAST:%.*]] = phi [[A]]* [ [[CUR]], {{%.*}} ], [ [[DEL:%.*]], {{%.*}} ] // CHECK-NEXT: [[DEL]] = getelementptr inbounds [[A]], [[A]]* [[PAST]], i64 -1 - // CHECK-NEXT: invoke void @_ZN5test21AD1Ev([[A]]* [[DEL]]) + // CHECKv03-NEXT: invoke void @_ZN5test21AD1Ev([[A]]* [[DEL]]) + // CHECKv11-NEXT: call void @_ZN5test21AD1Ev([[A]]* [[DEL]]) // CHECK: [[T0:%.*]] = icmp eq [[A]]* [[DEL]], [[BEGIN]] // CHECK-NEXT: br i1 [[T0]], }