summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHWriter.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-17 17:25:45 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-17 17:25:45 +0000
commit4505315726f40bd486daf80c07a4d0920c7b18dc (patch)
tree0b388f23d0cf1d4cc513680caec09036a5de14c4 /clang/lib/Frontend/PCHWriter.cpp
parentc0c9968f1b46c8e68eedf0a41396b12ac16bf243 (diff)
downloadbcm5719-llvm-4505315726f40bd486daf80c07a4d0920c7b18dc.tar.gz
bcm5719-llvm-4505315726f40bd486daf80c07a4d0920c7b18dc.zip
Write the preprocessor block after we write out types + declarations,
so that we catch any macros used within the declarations and types. Also, properly store a NULL selector. llvm-svn: 84334
Diffstat (limited to 'clang/lib/Frontend/PCHWriter.cpp')
-rw-r--r--clang/lib/Frontend/PCHWriter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp
index 73ce4bef345..a6ee441c869 100644
--- a/clang/lib/Frontend/PCHWriter.cpp
+++ b/clang/lib/Frontend/PCHWriter.cpp
@@ -1063,6 +1063,7 @@ void PCHWriter::WritePreprocessor(const Preprocessor &PP) {
// Loop over all the macro definitions that are live at the end of the file,
// emitting each to the PP section.
+ // FIXME: Make sure that this sees macros defined in included PCH files.
for (Preprocessor::macro_iterator I = PP.macro_begin(), E = PP.macro_end();
I != E; ++I) {
// FIXME: This emits macros in hash table order, we should do it in a stable
@@ -1886,7 +1887,6 @@ void PCHWriter::WritePCH(Sema &SemaRef, MemorizeStatCalls *StatCalls,
if (StatCalls && !isysroot)
WriteStatCache(*StatCalls, isysroot);
WriteSourceManagerBlock(Context.getSourceManager(), PP, isysroot);
- WritePreprocessor(PP);
WriteComments(Context);
// Write the record of special types.
Record.clear();
@@ -1919,6 +1919,7 @@ void PCHWriter::WritePCH(Sema &SemaRef, MemorizeStatCalls *StatCalls,
}
Stream.ExitBlock();
+ WritePreprocessor(PP);
WriteMethodPool(SemaRef);
WriteIdentifierTable(PP);
OpenPOWER on IntegriCloud