diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-11-11 23:20:24 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-11-11 23:20:24 +0000 |
commit | 484535e45b4d301847a157e943c7823da5d40884 (patch) | |
tree | 9111b7b94c787c78c038ce5010cc70bd494cb58b /include/clang/Lex/ModuleMap.h | |
parent | 9793e8f72a2d1f420bbbd97d41f7aaf727c26ca6 (diff) |
Teach the search for modules to consider modules described by a module
map, so long as they have an umbrella header. This makes it possible
to introduce a module map + umbrella header for a given set of
headers, to turn it into a module.
There are two major deficiencies here: first, we don't go hunting for
module map files when we just see a module import (so we won't know
about the modules described therein). Second, we don't yet have a way
to build modules that don't have umbrella headers, or have incomplete
umbrella headers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144424 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/ModuleMap.h')
-rw-r--r-- | include/clang/Lex/ModuleMap.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/clang/Lex/ModuleMap.h b/include/clang/Lex/ModuleMap.h index 291f2bbdec..6ca37f1005 100644 --- a/include/clang/Lex/ModuleMap.h +++ b/include/clang/Lex/ModuleMap.h @@ -89,7 +89,7 @@ private: llvm::IntrusiveRefCntPtr<DiagnosticsEngine> Diags; LangOptions LangOpts; - /// \brief The top-level modules that are known + /// \brief The top-level modules that are known. llvm::StringMap<Module *> Modules; /// \brief Mapping from each header to the module that owns the contents of the @@ -121,6 +121,13 @@ public: /// that no module owns this header file. Module *findModuleForHeader(const FileEntry *File); + /// \brief Retrieve a module with the given name. + /// + /// \param The name of the module to look up. + /// + /// \returns The named module, if known; otherwise, returns null. + Module *findModule(StringRef Name); + /// \brief Parse the given module map file, and record any modules we /// encounter. /// |