diff options
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/Frontend/FrontendActions.h | 3 | ||||
-rw-r--r-- | include/clang/Serialization/ASTWriter.h | 13 |
2 files changed, 10 insertions, 6 deletions
diff --git a/include/clang/Frontend/FrontendActions.h b/include/clang/Frontend/FrontendActions.h index 0c78a06746..bf071b3a51 100644 --- a/include/clang/Frontend/FrontendActions.h +++ b/include/clang/Frontend/FrontendActions.h @@ -11,6 +11,7 @@ #define LLVM_CLANG_FRONTEND_FRONTENDACTIONS_H #include "clang/Frontend/FrontendAction.h" +#include "clang/Lex/ModuleMap.h" #include <string> #include <vector> @@ -92,6 +93,8 @@ public: }; class GenerateModuleAction : public ASTFrontendAction { + ModuleMap::Module *Module; + protected: virtual ASTConsumer *CreateASTConsumer(CompilerInstance &CI, StringRef InFile); diff --git a/include/clang/Serialization/ASTWriter.h b/include/clang/Serialization/ASTWriter.h index 5d97c1815b..ac750c9196 100644 --- a/include/clang/Serialization/ASTWriter.h +++ b/include/clang/Serialization/ASTWriter.h @@ -18,6 +18,7 @@ #include "clang/AST/DeclarationName.h" #include "clang/AST/TemplateBase.h" #include "clang/AST/ASTMutationListener.h" +#include "clang/Lex/ModuleMap.h" #include "clang/Serialization/ASTBitCodes.h" #include "clang/Serialization/ASTDeserializationListener.h" #include "clang/Sema/SemaConsumer.h" @@ -412,7 +413,7 @@ private: void WriteASTCore(Sema &SemaRef, MemorizeStatCalls *StatCalls, StringRef isysroot, const std::string &OutputFile, - bool IsModule); + ModuleMap::Module *WritingModule); public: /// \brief Create a new precompiled header writer that outputs to @@ -428,14 +429,14 @@ public: /// \param StatCalls the object that cached all of the stat() calls made while /// searching for source files and headers. /// - /// \param IsModule Whether we're writing a module (otherwise, we're writing a - /// precompiled header). + /// \param WritingModule The module that we are writing. If null, we are + /// writing a precompiled header. /// /// \param isysroot if non-empty, write a relocatable file whose headers /// are relative to the given system root. void WriteAST(Sema &SemaRef, MemorizeStatCalls *StatCalls, const std::string &OutputFile, - bool IsModule, StringRef isysroot); + ModuleMap::Module *WritingModule, StringRef isysroot); /// \brief Emit a source location. void AddSourceLocation(SourceLocation Loc, RecordDataImpl &Record); @@ -672,7 +673,7 @@ public: class PCHGenerator : public SemaConsumer { const Preprocessor &PP; std::string OutputFile; - bool IsModule; + ModuleMap::Module *Module; std::string isysroot; raw_ostream *Out; Sema *SemaPtr; @@ -687,7 +688,7 @@ protected: public: PCHGenerator(const Preprocessor &PP, StringRef OutputFile, - bool IsModule, + ModuleMap::Module *Module, StringRef isysroot, raw_ostream *Out); ~PCHGenerator(); virtual void InitializeSema(Sema &S) { SemaPtr = &S; } |