summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Decl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r--clang/lib/AST/Decl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 8ce960ff5ff..b6d35f4260c 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -2449,6 +2449,12 @@ bool VarDecl::isKnownToBeDefined() const {
return hasDefinition();
}
+bool VarDecl::isNoDestroy(const ASTContext &Ctx) const {
+ return hasGlobalStorage() && (hasAttr<NoDestroyAttr>() ||
+ (!Ctx.getLangOpts().RegisterStaticDestructors &&
+ !hasAttr<AlwaysDestroyAttr>()));
+}
+
MemberSpecializationInfo *VarDecl::getMemberSpecializationInfo() const {
if (isStaticDataMember())
// FIXME: Remove ?
OpenPOWER on IntegriCloud