Implement AST/PCH chaining support for macro definitions. Previously,
commitee163a8f2890028453aae8529cd9901250713631
authorDouglas Gregor <doug.gregor@gmail.com>
Fri, 11 Feb 2011 00:26:14 +0000 (11 00:26 +0000)
committerDouglas Gregor <doug.gregor@gmail.com>
Fri, 11 Feb 2011 00:26:14 +0000 (11 00:26 +0000)
tree55e028ebf0f4e88db129f1834c8ba7edb279c959
parentcfcb61facc25e7ea798ea5d1f55677d9cc95df9c
Implement AST/PCH chaining support for macro definitions. Previously,
we would deserialize all of the macro definitions we knew about while
serializing the macro definitions at the end of the AST/PCH file. Even
though we skipped most of them (since they were unchanged), it's still
a performance problem.

Now, we do the standard AST/PCH chaining trick: watch what identifiers
are deserialized as macro names, and consider only those identifiers
(along with macro definitions that have been deserialized/written in
the source) when serializing the preprocessor state.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125324 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Serialization/ASTWriter.h
lib/Serialization/ASTWriter.cpp
test/PCH/reinclude1.h