diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-09-29 05:08:46 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2019-09-29 05:08:46 +0000 |
| commit | 2b4fa5348ee157b6b1a1af44d0137ca8c7a71573 (patch) | |
| tree | b3ac8e6a34f562040ad1ac1e7876eceac4f40a52 /clang/lib/CodeGen/CGCall.cpp | |
| parent | ac5969933ab7e43d26209ae6c15669842bc86104 (diff) | |
| download | bcm5719-llvm-2b4fa5348ee157b6b1a1af44d0137ca8c7a71573.tar.gz bcm5719-llvm-2b4fa5348ee157b6b1a1af44d0137ca8c7a71573.zip | |
For P0784R7: compute whether a variable has constant destruction if it
has a constexpr destructor.
For constexpr variables, reject if the variable does not have constant
destruction. In all cases, do not emit runtime calls to the destructor
for variables with constant destruction.
llvm-svn: 373159
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 7fa262ca6e8..0a0ba70d822 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -3093,7 +3093,7 @@ void CodeGenFunction::EmitDelegateCallArg(CallArgList &args, // Deactivate the cleanup for the callee-destructed param that was pushed. if (hasAggregateEvaluationKind(type) && !CurFuncIsThunk && type->getAs<RecordType>()->getDecl()->isParamDestroyedInCallee() && - type.isDestructedType()) { + param->needsDestruction(getContext())) { EHScopeStack::stable_iterator cleanup = CalleeDestructedParamCleanups.lookup(cast<ParmVarDecl>(param)); assert(cleanup.isValid() && |

