diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-11-30 17:33:56 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-11-30 17:33:56 +0000 |
commit | 392ed2b717d86ebdd202cb9bb58d18d8b3b4cd87 (patch) | |
tree | bcb3eaee26ddf777965589a13e04aafe08235bc4 /include/clang/Lex/ModuleMap.h | |
parent | d699ade396154238d2fa89bb09fdcfb79e5587d2 (diff) |
Implement (de-)serialization of the description of a module and its
submodules. This information will eventually be used for name hiding
when dealing with submodules. For now, we only use it to ensure that
the module "key" returned when loading a module will always be a
module (rather than occasionally being a FileEntry).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145497 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/ModuleMap.h')
-rw-r--r-- | include/clang/Lex/ModuleMap.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/clang/Lex/ModuleMap.h b/include/clang/Lex/ModuleMap.h index 4f89f1e728..c5727a9c35 100644 --- a/include/clang/Lex/ModuleMap.h +++ b/include/clang/Lex/ModuleMap.h @@ -162,6 +162,24 @@ public: /// \returns The named module, if known; otherwise, returns null. Module *findModule(StringRef Name); + /// \brief Find a new module or submodule, or create it if it does not already + /// exist. + /// + /// \param Name The name of the module to find or create. + /// + /// \param Parent The module that will act as the parent of this submodule, + /// or NULL to indicate that this is a top-level module. + /// + /// \param IsFramework Whether this is a framework module. + /// + /// \param IsExplicit Whether this is an explicit submodule. + /// + /// \returns The found or newly-created module, along with a boolean value + /// that will be true if the module is newly-created. + std::pair<Module *, bool> findOrCreateModule(StringRef Name, Module *Parent, + bool IsFramework, + bool IsExplicit); + /// \brief Infer the contents of a framework module map from the given /// framework directory. Module *inferFrameworkModule(StringRef ModuleName, |