diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-01-12 01:29:50 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-01-12 01:29:50 +0000 |
commit | ca2ab45341c448284cf93770018c717810575f86 (patch) | |
tree | f8434f1e91f4069e6bf65e51883e62bb34d8a86c /lib/Frontend | |
parent | 7d37b8bb101c872801e6d2ce82eec377a94ce042 (diff) |
Provide Decl::getOwningModule(), which determines the (sub)module in
which a particular declaration resides. Use this information to
customize the "definition of 'blah' must be imported from another
module" diagnostic with the module the user actually has to
import. Additionally, recover by importing that module, so we don't
complain about other names in that module.
Still TODO: coming up with decent Fix-Its for these cases, and expand
this recovery approach for other name lookup failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172290 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend')
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index f31301c6e9..5b2be91967 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -1201,3 +1201,9 @@ CompilerInstance::loadModule(SourceLocation ImportLoc, LastModuleImportResult = ModuleLoadResult(Module, false); return LastModuleImportResult; } + +void CompilerInstance::makeModuleVisible(Module *Mod, + Module::NameVisibilityKind Visibility){ + ModuleManager->makeModuleVisible(Mod, Visibility); +} + |