]> granicus.if.org Git - clang/commit
Implement AST/PCH chaining support for macro definitions. Previously,
authorDouglas Gregor <dgregor@apple.com>
Fri, 11 Feb 2011 00:26:14 +0000 (00:26 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 11 Feb 2011 00:26:14 +0000 (00:26 +0000)
commit040a804f852c45c8b8c371ce1d421fd4cd84b6fb
tree55e028ebf0f4e88db129f1834c8ba7edb279c959
parentc4850c2aa4c281a352e228aafc51fb1e30dcad02
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