summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-09-29 05:08:46 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2019-09-29 05:08:46 +0000
commit2b4fa5348ee157b6b1a1af44d0137ca8c7a71573 (patch)
treeb3ac8e6a34f562040ad1ac1e7876eceac4f40a52 /clang/lib/AST/ASTContext.cpp
parentac5969933ab7e43d26209ae6c15669842bc86104 (diff)
downloadbcm5719-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/AST/ASTContext.cpp')
-rw-r--r--clang/lib/AST/ASTContext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 091b2fe3462..f6919938d5a 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -10064,7 +10064,7 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) {
return false;
// Variables that have destruction with side-effects are required.
- if (VD->getType().isDestructedType())
+ if (VD->needsDestruction(*this))
return true;
// Variables that have initialization with side-effects are required.
OpenPOWER on IntegriCloud