diff options
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/Basic/DiagnosticFrontendKinds.td | 4 | ||||
-rw-r--r-- | include/clang/Frontend/CompilerInstance.h | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticFrontendKinds.td b/include/clang/Basic/DiagnosticFrontendKinds.td index f48e9e3809..cd797fce47 100644 --- a/include/clang/Basic/DiagnosticFrontendKinds.td +++ b/include/clang/Basic/DiagnosticFrontendKinds.td @@ -180,4 +180,8 @@ def err_missing_module : Error< "no module named '%0' declared in module map file '%1'">, DefaultFatal; def err_missing_umbrella_header : Error< "cannot open umbrella header '%0': %1">, DefaultFatal; +def err_no_submodule : Error<"no submodule named %0 in module '%1'">; +def err_no_submodule_suggest : Error< + "no submodule named %0 in module '%1'; did you mean '%2'?">; + } 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. |