Граф коммитов

15 Коммитов

Автор SHA1 Сообщение Дата
Andy Gibbs 8e8fb3be5b Prior to adding the new "expected-no-diagnostics" directive to VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166280 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-19 12:44:48 +00:00
Richard Smith 3e9ea0b8cd C++ constant expression handling: eagerly instantiate static const integral data
members of class templates so that their values can be used in ICEs. This
required reverting r105465, to get such instantiated members to be included in
serialized ASTs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147023 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-21 00:25:33 +00:00
Douglas Gregor a1be278c4f Completely re-implement (de-)serialization of declaration
chains. The previous implementation relied heavily on the declaration
chain being stored as a (circular) linked list on disk, as it is in
memory. However, when deserializing from multiple modules, the
different chains could get mixed up, leading to broken declaration chains.

The new solution keeps track of the first and last declarations in the
chain for each module file. When we load a declaration, we search all
of the module files for redeclarations of that declaration, then
splice together all of the lists into a coherent whole (along with any
redeclarations that were actually parsed). 

As a drive-by fix, (de-)serialize the redeclaration chains of
TypedefNameDecls, which had somehow gotten missed previously. Add a
test of this serialization.

This new scheme creates a redeclaration table that is fairly large in
the PCH file (on the order of 400k for Cocoa.h's 12MB PCH file). The
table is mmap'd in and searched via a binary search, but it's still
quite large. A future tweak will eliminate entries for declarations
that have no redeclarations anywhere, and should
drastically reduce the size of this table.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146841 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-17 23:38:30 +00:00
Sebastian Redl f79a71908d Add a decl update when a static data member of a class template is instantiated in a different PCH than its containing class. Otherwise we get double definition errors. Fixes a Boost.MPL problem that affects Boost.Accumulators and probably a lot more of Boost.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130488 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-29 08:19:30 +00:00
Argyrios Kyrtzidis b0f4b9a558 Introduce '-chain-include' option to specify headers that will be converted to chained PCHs in memory
without having to use multiple runs and intermediate files.

Intended for testing & debugging of chained PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127339 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-09 17:21:42 +00:00
Anders Carlsson f25330bd88 When deserializing CXXBaseSpecifiers (and offsets), make sure to walk the chain in the correct order.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127315 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-09 05:09:32 +00:00
Anders Carlsson c850578dbf Write CXX base specifier offsets for chained ASTs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127126 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-06 18:41:18 +00:00
Argyrios Kyrtzidis 565bf30bf5 Start fleshing out ASTMutationListener; notify when a tag definition is completed.
In that case a chained PCH will record the updates to the DefinitionData pointer of forward references.
If a forward reference mutated into a definition re-write it into the chained PCH, this is too big of a change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117239 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-24 17:26:50 +00:00
Argyrios Kyrtzidis 134db1fff5 Simplify and "robust-ify" the way that CXXRecord references point to the definition data when loaded from PCH.
Temporary disable 'test/PCH/chain-cxx.cpp' until a better way to fix it is in place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117234 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-24 17:26:31 +00:00
Argyrios Kyrtzidis 9703b0dd35 Fix issue with chained PCH where forward references did not pick up later definition in the chained PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116887 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-20 00:11:15 +00:00
Andrew Trick 220a9c82dc Putting back safe fixes 116836,116837,116838
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116866 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-19 21:54:32 +00:00
Andrew Trick 7cffb55ef5 Reverting 116836,116837,116838 until we resolve the getLangStandardForKind failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116859 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-19 21:14:46 +00:00
Argyrios Kyrtzidis 1d2a4311da Merge headers into test/PCH/chain-cxx.cpp for convenience.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116836 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-19 18:06:43 +00:00
Sebastian Redl 4153a060f4 AST writer support for having specializations of templates from earlier in the chain. This ought to finish C++ chained PCH support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111986 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 22:50:24 +00:00
Sebastian Redl 5967d6228f Add testcase for C++ chained PCH and fix the bugs it uncovered in name lookup.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111882 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-24 00:50:16 +00:00