summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2017-05-15 07:51:10 +0000
committerDaniel Jasper <djasper@google.com>2017-05-15 07:51:10 +0000
commit89f9ad8636c672eb26e881f0f9f31f7de8c303a0 (patch)
treef72d01e8924b0206ceca2284f28c79cfca738e15 /clang/lib/AST/Decl.cpp
parent06c61e863962f56ca0a8213eb3e2fa0666f5c53e (diff)
downloadbcm5719-llvm-89f9ad8636c672eb26e881f0f9f31f7de8c303a0.tar.gz
bcm5719-llvm-89f9ad8636c672eb26e881f0f9f31f7de8c303a0.zip
Revert r302965 - [modules] When creating a declaration, cache its owning
module immediately Also revert dependent r302969. This is leading to crashes. Will provide more details reproduction instructions to Richard. llvm-svn: 303037
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r--clang/lib/AST/Decl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index a1342f477b6..0f2558e24ba 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -47,7 +47,9 @@ bool Decl::isOutOfLine() const {
TranslationUnitDecl::TranslationUnitDecl(ASTContext &ctx)
: Decl(TranslationUnit, nullptr, SourceLocation()),
- DeclContext(TranslationUnit), Ctx(ctx), AnonymousNamespace(nullptr) {}
+ DeclContext(TranslationUnit), Ctx(ctx), AnonymousNamespace(nullptr) {
+ Hidden = Ctx.getLangOpts().ModulesLocalVisibility;
+}
//===----------------------------------------------------------------------===//
// NamedDecl Implementation
OpenPOWER on IntegriCloud