diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-05-13 00:00:16 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-05-13 00:00:16 +0000 |
commit | ab2094bec03b5d0c32f484bd3730e1f47846e3e8 (patch) | |
tree | 4a9eb9916d249edc4b62d262ae5996112edd5057 /lib/AST/DeclBase.cpp | |
parent | c9d8bd8ed2a5aa8c7e0934e12fc0bf38c78646da (diff) |
Add LangOptions method to query whether we are tracking the owning module for a local declaration.
In preparation for expanding this behavior to cover additional cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302969 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index 97b7465b42..e0c626c585 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -75,7 +75,7 @@ void *Decl::operator new(std::size_t Size, const ASTContext &Ctx, assert(!Parent || &Parent->getParentASTContext() == &Ctx); // With local visibility enabled, we track the owning module even for local // declarations. - if (Ctx.getLangOpts().ModulesLocalVisibility) { + if (Ctx.getLangOpts().trackLocalOwningModule()) { // Ensure required alignment of the resulting object by adding extra // padding at the start if required. size_t ExtraAlign = @@ -96,7 +96,7 @@ Module *Decl::getOwningModuleSlow() const { } bool Decl::hasLocalOwningModuleStorage() const { - return getASTContext().getLangOpts().ModulesLocalVisibility; + return getASTContext().getLangOpts().trackLocalOwningModule(); } const char *Decl::getDeclKindName() const { |