History log of /external/clang/include/clang/Lex/ExternalPreprocessorSource.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9946fc735d7285f2195f89635370f534afd9877e 12-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Add missing includes and forward declarations so that headers don't depend on
other headers included before them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172320 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/ExternalPreprocessorSource.h
6c6c54a59a6e7dbe63ff6a9bbab76f6e0c7c8462 11-Oct-2012 Douglas Gregor <dgregor@apple.com> Deserialize macro history when we deserialize an identifier that has
macro history.

When deserializing macro history, we arrange history such that the
macros that have definitions (that haven't been #undef'd) and are
visible come at the beginning of the list, which is what the
preprocessor and other clients of Preprocessor::getMacroInfo()
expect. If additional macro definitions become visible later, they'll
be moved toward the front of the list. Note that it's possible to have
ambiguities, but we don't diagnose them yet.

There is a partially-implemented design decision here that, if a
particular identifier has been defined or #undef'd within the
translation unit, that definition (or #undef) hides any macro
definitions that come from imported modules. There's still a little
work to do to ensure that the right #undef'ing happens.

Additionally, we'll need to scope the update records for #undefs, so
they only kick in when the submodule containing that update record
becomes visible.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165682 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/ExternalPreprocessorSource.h
eee242ff426bf79149f221798966e58688383c1e 27-Oct-2011 Douglas Gregor <dgregor@apple.com> Make the loading of information attached to an IdentifierInfo from an
AST file more lazy, so that we don't eagerly load that information for
all known identifiers each time a new AST file is loaded. The eager
reloading made some sense in the context of precompiled headers, since
very few identifiers were defined before PCH load time. With modules,
however, a huge amount of code can get parsed before we see an
@import, so laziness becomes important here.

The approach taken to make this information lazy is fairly simple:
when we load a new AST file, we mark all of the existing identifiers
as being out-of-date. Whenever we want to access information that may
come from an AST (e.g., whether the identifier has a macro definition,
or what top-level declarations have that name), we check the
out-of-date bit and, if it's set, ask the AST reader to update the
IdentifierInfo from the AST files. The update is a merge, and we now
take care to merge declarations before/after imports with declarations
from multiple imports.

The results of this optimization are fairly dramatic. On a small
application that brings in 14 non-trivial modules, this takes modules
from being > 3x slower than a "perfect" PCH file down to 30% slower
for a full rebuild. A partial rebuild (where the PCH file or modules
can be re-used) is down to 7% slower. Making the PCH file just a
little imperfect (e.g., adding two smallish modules used by a bunch of
.m files that aren't in the PCH file) tips the scales in favor of the
modules approach, with 24% faster partial rebuilds.

This is just a first step; the lazy scheme could possibly be improved
by adding versioning, so we don't search into modules we already
searched. Moreover, we'll need similar lazy schemes for all of the
other lookup data structures, such as DeclContexts.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/ExternalPreprocessorSource.h
295a2a617ac335f590e430ab7fcd98f8ce109251 30-Oct-2010 Douglas Gregor <dgregor@apple.com> Make the deserialization of macro definitions lazy, so that we can
load identifiers without loading their corresponding macro
definitions. This is likely to improve PCH performance slightly, and
reduces deserialization stack depth considerably when using
preprocessor metaprogramming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/ExternalPreprocessorSource.h
c43b54cbc10654ed59de797898042e1a05265246 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename PCHReader to ASTReader.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/ExternalPreprocessorSource.h
f8c381fff1a3c10e0f7f0c9f223f08e8d7dce0e3 04-Jan-2010 Daniel Dunbar <daniel@zuster.org> Add missing newline (which breaks MSVC build???)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/ExternalPreprocessorSource.h
88a35862fbe473f2a4f0c19f24dbe536937e1dc6 04-Jan-2010 Douglas Gregor <dgregor@apple.com> Teach Preprocessor::macro_begin/macro_end to lazily load all macro
definitions from a precompiled header. This ensures that
code-completion with macro names behaves the same with or without
precompiled headers.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/Lex/ExternalPreprocessorSource.h