diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-12-06 01:10:29 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-12-06 01:10:29 +0000 |
commit | e209e5026892cb07294f733c72bd51359c0f0e72 (patch) | |
tree | ba7b04ead00a1068a2ff130d38cc6b4b24a48d53 /include/clang | |
parent | 19efa3ee5a7f2232884f9cca6871329ffe85653c (diff) |
Implement inferred submodules support, which (when requested)
implicitly generates submodules corresponding to the headers that fall
within a module.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145887 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/Lex/ModuleMap.h | 7 | ||||
-rw-r--r-- | include/clang/Serialization/ASTWriter.h | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/clang/Lex/ModuleMap.h b/include/clang/Lex/ModuleMap.h index fdd5ddbf5f..1ef4f674e2 100644 --- a/include/clang/Lex/ModuleMap.h +++ b/include/clang/Lex/ModuleMap.h @@ -177,6 +177,13 @@ public: /// module owns this source location. Module *inferModuleFromLocation(FullSourceLoc Loc); + /// \brief Sets the umbrella header of the given module to the given + /// header. + void setUmbrellaHeader(Module *Mod, const FileEntry *UmbrellaHeader); + + /// \brief Adds this header to the given module. + void addHeader(Module *Mod, const FileEntry *Header); + /// \brief Parse the given module map file, and record any modules we /// encounter. /// diff --git a/include/clang/Serialization/ASTWriter.h b/include/clang/Serialization/ASTWriter.h index 7dd018d9fe..ab0d1ef3d9 100644 --- a/include/clang/Serialization/ASTWriter.h +++ b/include/clang/Serialization/ASTWriter.h @@ -101,6 +101,9 @@ private: /// \brief The reader of existing AST files, if we're chaining. ASTReader *Chain; + /// \brief The module we're currently writing, if any. + Module *WritingModule; + /// \brief Indicates when the AST writing is actively performing /// serialization, rather than just queueing updates. bool WritingAST; @@ -368,6 +371,9 @@ private: /// be a positive integer. llvm::DenseMap<Module *, unsigned> SubmoduleIDs; + /// \brief Retrieve or create a submodule ID for this module. + unsigned getSubmoduleID(Module *Mod); + /// \brief Write the given subexpression to the bitstream. void WriteSubStmt(Stmt *S, llvm::DenseMap<Stmt *, uint64_t> &SubStmtEntries, |