diff options
author | Daniel Jasper <djasper@google.com> | 2017-05-15 07:51:10 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2017-05-15 07:51:10 +0000 |
commit | 89f9ad8636c672eb26e881f0f9f31f7de8c303a0 (patch) | |
tree | f72d01e8924b0206ceca2284f28c79cfca738e15 /clang/lib/Sema/SemaDecl.cpp | |
parent | 06c61e863962f56ca0a8213eb3e2fa0666f5c53e (diff) | |
download | bcm5719-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/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index fb3922d5721..fb5f56e0523 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -16034,14 +16034,6 @@ void Sema::ActOnModuleBegin(SourceLocation DirectiveLoc, Module *Mod) { ModuleScopes.back().OuterVisibleModules = std::move(VisibleModules); VisibleModules.setVisible(Mod, DirectiveLoc); - - // The enclosing context is now part of this module. - // FIXME: Consider creating a child DeclContext to hold the entities - // lexically within the module. - if (getLangOpts().trackLocalOwningModule()) { - cast<Decl>(CurContext)->setHidden(true); - cast<Decl>(CurContext)->setLocalOwningModule(Mod); - } } void Sema::ActOnModuleEnd(SourceLocation EomLoc, Module *Mod) { @@ -16070,13 +16062,6 @@ void Sema::ActOnModuleEnd(SourceLocation EomLoc, Module *Mod) { DirectiveLoc = EomLoc; } BuildModuleInclude(DirectiveLoc, Mod); - - // Any further declarations are in whatever module we returned to. - if (getLangOpts().trackLocalOwningModule()) { - cast<Decl>(CurContext)->setLocalOwningModule(getCurrentModule()); - if (!getCurrentModule()) - cast<Decl>(CurContext)->setHidden(false); - } } void Sema::createImplicitModuleImportForErrorRecovery(SourceLocation Loc, |