diff options
author | Charles Li <charles.li@sony.com> | 2017-01-09 18:24:16 +0000 |
---|---|---|
committer | Charles Li <charles.li@sony.com> | 2017-01-09 18:24:16 +0000 |
commit | c24cbe958c6e8b418d0f767abfe702cf7035bcf8 (patch) | |
tree | f96191d2df094436d3d4bf554c8da58a2ccd7d78 /test/CodeGenCXX/eh-aggregate-copy-destroy.cpp | |
parent | 0982ba044f48b8d0658cdd7ceeacee0b7a614a88 (diff) |
[Lit Test] Make tests C++11 compatible - nothrow destructors
In C++11, a destructor's implicit exception-spec is nothrow.
The IR for the destructor's invocation changed from invoke to call.
Differential Revision: https://reviews.llvm.org/D28425
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291458 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/eh-aggregate-copy-destroy.cpp')
-rw-r--r-- | test/CodeGenCXX/eh-aggregate-copy-destroy.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/CodeGenCXX/eh-aggregate-copy-destroy.cpp b/test/CodeGenCXX/eh-aggregate-copy-destroy.cpp index 29fb5567fb..9f0f36c875 100644 --- a/test/CodeGenCXX/eh-aggregate-copy-destroy.cpp +++ b/test/CodeGenCXX/eh-aggregate-copy-destroy.cpp @@ -1,7 +1,8 @@ // Check that in case of copying an array of memcpy-able objects, their // destructors will be called if an exception is thrown. // -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fexceptions -fcxx-exceptions -O0 -fno-elide-constructors -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fexceptions -fcxx-exceptions -O0 -fno-elide-constructors -std=c++98 -emit-llvm %s -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK98 %s +// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fexceptions -fcxx-exceptions -O0 -fno-elide-constructors -std=c++11 -emit-llvm %s -o - | FileCheck -check-prefix=CHECK -check-prefix=CHECK11 %s struct ImplicitCopy { int x; @@ -25,7 +26,8 @@ int main () { // CHECK_LABEL: main // CHECK-NOT: call void @_ZN9ThrowCopyC1ERKS_ // CHECK: invoke void @_ZN9ThrowCopyC1ERKS_ - // CHECK: invoke void @_ZN12ImplicitCopyD1Ev + // CHECK98: invoke void @_ZN12ImplicitCopyD1Ev + // CHECK11: call void @_ZN12ImplicitCopyD1Ev Container c2(c1); } catch (...) { |