2012-12-12 06:11:52 +08:00
|
|
|
@import redecl_merge_left;
|
2011-12-23 03:44:59 +08:00
|
|
|
|
|
|
|
@class C4;
|
|
|
|
@class C4;
|
2012-01-02 05:47:52 +08:00
|
|
|
@protocol P4;
|
|
|
|
@protocol P4;
|
|
|
|
@protocol P4;
|
2012-12-12 06:11:52 +08:00
|
|
|
@import redecl_merge_right;
|
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.
llvm-svn: 146841
2011-12-18 07:38:30 +08:00
|
|
|
|
2011-12-19 23:27:36 +08:00
|
|
|
@class B;
|
|
|
|
|
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.
llvm-svn: 146841
2011-12-18 07:38:30 +08:00
|
|
|
@class A;
|
2011-12-19 23:27:36 +08:00
|
|
|
|
2012-01-02 04:30:41 +08:00
|
|
|
@protocol P1;
|
|
|
|
|
2012-01-04 06:46:00 +08:00
|
|
|
struct S1;
|
|
|
|
struct S3;
|
|
|
|
|
2011-12-23 05:40:42 +08:00
|
|
|
void refers_to_C4(C4*);
|
|
|
|
|
2013-02-12 02:16:18 +08:00
|
|
|
@interface UnrelatedToDeclaredThenLoaded
|
|
|
|
- declaredThenLoadedMethod;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@class DeclaredThenLoaded;
|