Go to file
Douglas Gregor 05f10357a9 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-17 23:38:30 +00:00
clang Completely re-implement (de-)serialization of declaration 2011-12-17 23:38:30 +00:00
compiler-rt Recently the GCD tests started failing because of the invalid size of 2011-12-16 19:13:35 +00:00
debuginfo-tests Testcase for r133065 2011-06-15 17:57:23 +00:00
libcxx Allow unique_ptr<T const []> to be constructed with a T* (in addition to a const T*) 2011-12-16 15:37:23 +00:00
libcxxabi Fixed several bugs, implemented support for vector types, and cleaned out dead code. 2011-12-15 20:02:15 +00:00
lld More renaming. 2011-12-17 12:35:04 +00:00
lldb Fixed code rot pointed out by Jim. 2011-12-17 02:07:52 +00:00
llvm Revert 146728 as it's causing failures on some of the external bots as well as 2011-12-17 22:19:53 +00:00
polly Adapt to move of isSafeToSpeculativelyExecute into another header. 2011-12-16 08:27:42 +00:00