From 2171bf1caba4d4b9eeb6a91efac4300b41f38b07 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Sun, 15 Jan 2012 16:58:34 +0000 Subject: Completely re-implement (de-)serialization of redeclaration chains, again. The prior implementation was very linked-list oriented, and the list-splicing logic was both fairly convoluted (when loading from multiple modules) and failed to preserve a reasonable ordering for the redeclaration chains. This new implementation uses a simpler strategy, where we store the ordered redeclaration chains in an array-like structure (indexed based on the first declaration), and use that ordering to add individual deserialized declarations to the end of the existing chain. That way, the chain mimics the ordering from its modules, and a bug somewhere is far less likely to result in a broken linked list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148222 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Serialization/Module.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Serialization/Module.cpp') diff --git a/lib/Serialization/Module.cpp b/lib/Serialization/Module.cpp index 7db3accd55..cb8c9cca06 100644 --- a/lib/Serialization/Module.cpp +++ b/lib/Serialization/Module.cpp @@ -35,7 +35,7 @@ ModuleFile::ModuleFile(ModuleKind Kind) SelectorLookupTableData(0), SelectorLookupTable(0), LocalNumDecls(0), DeclOffsets(0), BaseDeclID(0), LocalNumCXXBaseSpecifiers(0), CXXBaseSpecifiersOffsets(0), - FileSortedDecls(0), RedeclarationsInfo(0), LocalNumRedeclarationsInfos(0), + FileSortedDecls(0), RedeclarationsMap(0), LocalNumRedeclarationsInMap(0), LocalNumTypes(0), TypeOffsets(0), BaseTypeIndex(0), StatCache(0) {} -- cgit v1.2.3-18-g5258