diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-10 17:15:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-10 17:15:23 +0000 |
commit | eeffaef7b9defbc6cff54f433242bd5659c12a27 (patch) | |
tree | 290ce9e1eb3b2125901b96f9c9b2f1acb0e7d35c /clang/lib/Frontend/PCHWriter.cpp | |
parent | 5f122a644adeb88616c36eb82c4ea44d9ec8ca5e (diff) | |
download | bcm5719-llvm-eeffaef7b9defbc6cff54f433242bd5659c12a27.tar.gz bcm5719-llvm-eeffaef7b9defbc6cff54f433242bd5659c12a27.zip |
Arrange for the preprocessor to be passed down into the PCH writer.
llvm-svn: 68790
Diffstat (limited to 'clang/lib/Frontend/PCHWriter.cpp')
-rw-r--r-- | clang/lib/Frontend/PCHWriter.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp index d4961e4e744..b60fc2f4b6a 100644 --- a/clang/lib/Frontend/PCHWriter.cpp +++ b/clang/lib/Frontend/PCHWriter.cpp @@ -474,6 +474,13 @@ void PCHWriter::WriteSourceManagerBlock(SourceManager &SourceMgr) { S.ExitBlock(); } +/// \brief Writes the block containing the serialized form of the +/// preprocessor. +/// +void PCHWriter::WritePreprocessor(Preprocessor &PP) { +} + + /// \brief Write the representation of a type to the PCH stream. void PCHWriter::WriteType(const Type *T) { pch::ID &ID = TypeIDs[T]; @@ -659,7 +666,7 @@ void PCHWriter::WriteDeclsBlock(ASTContext &Context) { PCHWriter::PCHWriter(llvm::BitstreamWriter &S) : S(S), NextTypeID(pch::NUM_PREDEF_TYPE_IDS) { } -void PCHWriter::WritePCH(ASTContext &Context) { +void PCHWriter::WritePCH(ASTContext &Context, Preprocessor &PP) { // Emit the file header. S.Emit((unsigned)'C', 8); S.Emit((unsigned)'P', 8); @@ -673,6 +680,7 @@ void PCHWriter::WritePCH(ASTContext &Context) { // Write the remaining PCH contents. S.EnterSubblock(pch::PCH_BLOCK_ID, 2); WriteSourceManagerBlock(Context.getSourceManager()); + WritePreprocessor(PP); WriteTypesBlock(Context); WriteDeclsBlock(Context); S.ExitBlock(); |