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 | c147b0bc31cbce36167dc04ca82c050362cf0378 (patch) | |
tree | 58d7b59c41c336a20bbd1d0f9cd163241ef19de6 /clang/lib/Frontend/CompilerInstance.cpp | |
parent | 4a5030c72f6bd0a36e11d48c5c95b98dfee67164 (diff) | |
download | bcm5719-llvm-c147b0bc31cbce36167dc04ca82c050362cf0378.tar.gz bcm5719-llvm-c147b0bc31cbce36167dc04ca82c050362cf0378.zip |
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.
llvm-svn: 172290
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index f31301c6e9f..5b2be919677 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/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); +} + |