diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-11-30 04:03:44 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-11-30 04:03:44 +0000 |
commit | 49009ec701feb3009450e57e40c656e2ad7c1f41 (patch) | |
tree | 54cb8918b4ec5558494cb58c3d7e667c58eaa616 /include/clang/Frontend/CompilerInstance.h | |
parent | dc8dab6fabf4bfd4f4b94bf572ac3342a5bbfcd7 (diff) |
When loading a module that involves submodules (e.g., std.vector),
check whether the named submodules themselves are actually
valid, and drill down to the named submodule (although we don't do
anything with it yet). Perform typo correction on the submodule names
when possible.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145477 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CompilerInstance.h')
-rw-r--r-- | include/clang/Frontend/CompilerInstance.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h index 9f982c9265..90de3138a4 100644 --- a/include/clang/Frontend/CompilerInstance.h +++ b/include/clang/Frontend/CompilerInstance.h @@ -12,7 +12,9 @@ #include "clang/Frontend/CompilerInvocation.h" #include "clang/Lex/ModuleLoader.h" +#include "clang/Lex/ModuleMap.h" #include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/OwningPtr.h" @@ -34,6 +36,7 @@ class CodeCompleteConsumer; class DiagnosticsEngine; class DiagnosticConsumer; class ExternalASTSource; +class FileEntry; class FileManager; class FrontendAction; class Preprocessor; @@ -96,6 +99,16 @@ class CompilerInstance : public ModuleLoader { /// \brief Non-owning reference to the ASTReader, if one exists. ASTReader *ModuleManager; + /// \brief A module that we have already attempted to load, which is known + /// by either a file entry (FIXME: a temporary measure) or via its module + /// definition. + typedef llvm::PointerUnion<const FileEntry *, ModuleMap::Module *> + KnownModule; + + /// \brief The set of top-level modules that has already been loaded, + /// along with the module map + llvm::DenseMap<const IdentifierInfo *, KnownModule> KnownModules; + /// \brief Holds information about the output file. /// /// If TempFilename is not empty we must rename it to Filename at the end. |