diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-11-11 22:18:48 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-11-11 22:18:48 +0000 |
commit | 65f3b5e99009f49d51eb00a859dbd2c2ee660718 (patch) | |
tree | bfe0e47aa7bbb690bd96e44adb23a058e196fd07 /include/clang/Lex/ModuleMap.h | |
parent | 8b6d3deb5af464e1afbbeccdec369c5d4252b1a0 (diff) |
Wire up the mapping from header files mentioned in module maps over to
the corresponding (top-level) modules. This isn't actually useful yet,
because we don't yet have a way to build modules out of module maps.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144410 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/ModuleMap.h')
-rw-r--r-- | include/clang/Lex/ModuleMap.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/clang/Lex/ModuleMap.h b/include/clang/Lex/ModuleMap.h index 2834f6a11b..291f2bbdec 100644 --- a/include/clang/Lex/ModuleMap.h +++ b/include/clang/Lex/ModuleMap.h @@ -79,6 +79,9 @@ public: /// \brief Retrieve the full name of this module, including the path from /// its top-level module. std::string getFullModuleName() const; + + /// \brief Retrieve the name of the top-level module. + StringRef getTopLevelModuleName() const; }; private: @@ -105,9 +108,19 @@ public: /// \param DC A diagnostic consumer that will be cloned for use in generating /// diagnostics. ModuleMap(FileManager &FileMgr, const DiagnosticConsumer &DC); - + + /// \brief Destroy the module map. + /// ~ModuleMap(); + /// \brief Retrieve the module that owns the given header file, if any. + /// + /// \param File The header file that is likely to be included. + /// + /// \returns The module that owns the given header file, or null to indicate + /// that no module owns this header file. + Module *findModuleForHeader(const FileEntry *File); + /// \brief Parse the given module map file, and record any modules we /// encounter. /// @@ -115,7 +128,7 @@ public: /// /// \returns true if an error occurred, false otherwise. bool parseModuleMapFile(const FileEntry *File); - + /// \brief Dump the contents of the module map, for debugging purposes. void dump(); }; |