diff options
Diffstat (limited to 'include/clang/Lex/ModuleMap.h')
-rw-r--r-- | include/clang/Lex/ModuleMap.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/include/clang/Lex/ModuleMap.h b/include/clang/Lex/ModuleMap.h index 1cd6d385b6..dbd9fd1c0c 100644 --- a/include/clang/Lex/ModuleMap.h +++ b/include/clang/Lex/ModuleMap.h @@ -131,6 +131,10 @@ private: /// \brief Whether the modules we infer are [system] modules. unsigned InferSystemModules : 1; + /// \brief If \c InferModules is non-zero, the module map file that allowed + /// inferred modules. Otherwise, nullptr. + const FileEntry *ModuleMapFile; + /// \brief The names of modules that cannot be inferred within this /// directory. SmallVector<std::string, 2> ExcludedModules; @@ -182,6 +186,15 @@ private: /// associated with a specific module (e.g. in /usr/include). HeadersMap::iterator findKnownHeader(const FileEntry *File); + /// \brief Searches for a module whose umbrella directory contains \p File. + /// + /// \param File The header to search for. + /// + /// \param IntermediateDirs On success, contains the set of directories + /// searched before finding \p File. + KnownHeader findHeaderInUmbrellaDirs(const FileEntry *File, + SmallVectorImpl<const DirectoryEntry *> &IntermediateDirs); + public: /// \brief Construct a new module map. /// @@ -242,6 +255,11 @@ public: /// marked 'unavailable'. bool isHeaderInUnavailableModule(const FileEntry *Header) const; + /// \brief Determine whether the given header is unavailable as part + /// of the specified module. + bool isHeaderUnavailableInModule(const FileEntry *Header, + const Module *RequestingModule) const; + /// \brief Retrieve a module with the given name. /// /// \param Name The name of the module to look up. @@ -279,13 +297,17 @@ public: /// \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 ModuleMap The module map that defines or allows the inference of + /// this 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, + std::pair<Module *, bool> findOrCreateModule(StringRef Name, Module *Parent, + const FileEntry *ModuleMap, bool IsFramework, bool IsExplicit); |