History log of /external/clang/include/clang/AST/Redeclarable.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
dec17760923a23c5a185944d14d7455df6b09d86 28-May-2012 David Blaikie <dblaikie@gmail.com> Address minor FIXME in RedeclLink to contain a PointerIntPair instead of derive from it.

Use actual factory functions rather than derived classes acting as named constructors/factories.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157588 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Redeclarable.h
ef96ee0be5f100789f451641542a69cd719144d2 14-Jan-2012 Douglas Gregor <dgregor@apple.com> De-virtualize getPreviousDecl() and getMostRecentDecl() when we know
we have a redeclarable type, and only use the new virtual versions
(getPreviousDeclImpl() and getMostRecentDeclImpl()) when we don't have
that type information. This keeps us from penalizing users with strict
type information (and is the moral equivalent of a "final" method).

Plus, settle on the names getPreviousDecl() and getMostRecentDecl()
throughout.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Redeclarable.h
672b3232f7b0cc5dc024a7702be1a26885fdea57 17-Dec-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add a sanity check in the Redeclarable::redecl_iterator to avoid infinite loop
when we formed an invalid redeclaration chain due to a bug.

Thanks to Doug for the hint!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Redeclarable.h
381d34e0b205ca27bcc7e7c1652561941c437965 06-Dec-2010 Douglas Gregor <dgregor@apple.com> Re-implement caching for the linkage calculation of declarations.

My previous attempt at solving the compile-time problem with many
redeclarations of the same entity cached both linkage and visibility,
while this patch only tackles linkage. There are several reasons for
this difference:

- Linkage is a language concept, and is evaluated many times during
semantic analysis and codegen, while visibility is only a
code-generation concept that is evaluated only once per (unique)
declaration. Hence, we *must* optimize linkage calculations but
don't need to optimize visibility computation.
- Once we know the linkage of a declaration, subsequent
redeclarations can't change that linkage. Hence, cache
invalidation is far simpler than for visibility, where a later
redeclaration can completely change the visibility.
- We have 3 spare bits in Decl to store the linkage cache, so the
cache doesn't increase the size of declarations. With the
visibility+linkage cache, NamedDecl got larger.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Redeclarable.h
b5f35bae05f1ce3ae62ca52b266a086fd019e89b 06-Dec-2010 Douglas Gregor <dgregor@apple.com> Revert r120808, my previous implementation of caching for the linkage
and visibility of declarations, because it was extremely messy and it
increased the size of NamedDecl.

An improved implementation is forthcoming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Redeclarable.h
2357207a5753547740c70a12c3b37f71afa93f8a 03-Dec-2010 Douglas Gregor <dgregor@apple.com> Implement caching for the linkage and visibility calculations of
declarations.

The motivation for this patch is that linkage/visibility computations
are linear in the number of redeclarations of an entity, and we've run
into a case where a single translation unit has > 6500 redeclarations
of the same (unused!) external variable. Since each redeclaration
involves a linkage check, the resulting quadratic behavior makes Clang
slow to a crawl. With this change, a simple test with 512
redeclarations of a variable syntax-checks ~20x faster than
before.

That said, I hate this change, and will probably end up reverting it
in a few hours. Reasons to hate it:
- It makes NamedDecl larger, since we don't have enough free bits in
Decl to squeeze in the extra information about caching.
- There are way too many places where we need to invalidate this
cache, because the visibility of a declaration can change due to
redeclarations (!). Despite self-hosting and passing the testsuite,
I have no confidence that I've found all of places where this cache
needs to be invalidated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Redeclarable.h
d527cc06d78fe5afa5f20105b51697637eb02c56 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename PCHDeclReader -> ASTDeclReader.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Redeclarable.h
3397c5570369f19b2d6c52e898f708d75ceede1f 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Do the PCH->AST rename for ASTWriter's implementation parts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Redeclarable.h
a865005c74019184e04f7fcdd4d61c31c095a4ff 03-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Apart from storing/retrieving the previous redeclaration from PCH, also store/retrieve the most recent
redeclaration. That way we are sure that the full redeclarations chain is loaded.

When using chained PCHs, first declarations point to the most recent redeclarations in the same PCH.
To address this use a REDECLS_UPDATE_LATEST record block to keep track of which first declarations need
to point to a most recent redeclaration in another PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110125 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Redeclarable.h
37ffed3b7f229844cae2463ff82b527506c86c74 02-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Fully read/write CXXRecordDecl for PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Redeclarable.h
3233441b439a3dee9fa187f2c195b5188e71483b 25-Nov-2009 Douglas Gregor <dgregor@apple.com> Qualify the name of the llvm::cast template. I am somewhat amazed that GCC parsed this

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Redeclarable.h
46408eedfff5aa33662cedb6716a20616f3bad31 24-Nov-2009 Sebastian Redl <sebastian.redl@getdesigned.at> Make sure redeclaration chains are properly linked, even through invalid decls. This fixes PR5415.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89777 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Redeclarable.h
7745cab137b9d91205f13a7adaebe6ed801595f7 15-Nov-2009 Douglas Gregor <dgregor@apple.com> Make a few headers parse standalone

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Redeclarable.h
efc18e41f122b6ccac507bd9ec1aa7cb8845c2db 13-Nov-2009 Chris Lattner <sabre@nondot.org> add a fixme, inheriting from PointerIntPair is gross :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Redeclarable.h
457e2815d43fa68f7ff7cd2f7e9d1bf7b6fdc653 28-Oct-2009 Douglas Gregor <dgregor@apple.com> Mangle based on the declaration we're given, not the canonical
declaration, since attributes that affect mangling may have been added
to subsequent declarations. However, to determine the linkage of the
declaration, we need to look at the canonical declaration. Fixes PR4412.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85400 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Redeclarable.h
740256bafbba6c5b5cb95a5c5bd7db161f3b2833 29-Sep-2009 Mike Stump <mrs@apple.com> Fix http://llvm.org/PR5090.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83035 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Redeclarable.h
1eb4433ac451dc16f4133a88af2d002ac26c58ef 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/include/clang/AST/Redeclarable.h
f23e839e9ddea324c743d26da43fb767f90ca223 18-Jul-2009 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce the Redeclarable template class, which serves as a base type defining the common interface for Decls that can be redeclared.
Make FunctionDecl and VarDecl use it.

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