diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-05-12 23:27:00 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2017-05-12 23:27:00 +0000 |
commit | fc8c57cc5ba561e5d12794399d15aae35929b56d (patch) | |
tree | 8b6066fb88bd29ca847706857a674163385a196d /clang/lib/AST/Decl.cpp | |
parent | 2a735421d1aace9d64c4ee7adc1f905974311db3 (diff) | |
download | bcm5719-llvm-fc8c57cc5ba561e5d12794399d15aae35929b56d.tar.gz bcm5719-llvm-fc8c57cc5ba561e5d12794399d15aae35929b56d.zip |
[modules] When creating a declaration, cache its owning module immediately
rather than waiting until it's queried.
Currently this is only applied to local submodule visibility mode, as we don't
yet allocate storage for the owning module in non-local-visibility modules
compilations.
llvm-svn: 302965
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r-- | clang/lib/AST/Decl.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index 0f2558e24ba..a1342f477b6 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -47,9 +47,7 @@ bool Decl::isOutOfLine() const { TranslationUnitDecl::TranslationUnitDecl(ASTContext &ctx) : Decl(TranslationUnit, nullptr, SourceLocation()), - DeclContext(TranslationUnit), Ctx(ctx), AnonymousNamespace(nullptr) { - Hidden = Ctx.getLangOpts().ModulesLocalVisibility; -} + DeclContext(TranslationUnit), Ctx(ctx), AnonymousNamespace(nullptr) {} //===----------------------------------------------------------------------===// // NamedDecl Implementation |