aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-10 17:15:23 +0000
committerChris Lattner <sabre@nondot.org>2009-04-10 17:15:23 +0000
commit0b1fb988012da21d996c43e36867787a7a07b889 (patch)
tree3a0bd2fa44feefea48acfe43fe2637332ed3a7ac /lib/Frontend/PCHWriter.cpp
parentcadbe1cfdace63ebe9a1251c4a1ce78452be7f52 (diff)
Arrange for the preprocessor to be passed down into the PCH writer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68790 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHWriter.cpp')
-rw-r--r--lib/Frontend/PCHWriter.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Frontend/PCHWriter.cpp b/lib/Frontend/PCHWriter.cpp
index d4961e4e74..b60fc2f4b6 100644
--- a/lib/Frontend/PCHWriter.cpp
+++ b/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();