From d88a7f1a9281fd1d2675a8860cc1971dd5c9b93d Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 1 Sep 2015 20:35:42 +0000 Subject: Re-commit r246497 (and dependent changes r246524 and r246521), reverted in r246546, with a workaround for an MSVC 2013 miscompile and an MSVC 2015 rejects-valid. Original commit message: [modules] Rework serialized DeclContext lookup table management. Instead of walking the loaded ModuleFiles looking for lookup tables for the context, store them all in one place, and merge them together if we find we have too many (currently, more than 4). If we do merge, include the merged form in our serialized lookup table, so that downstream readers never need to look at our imports' tables. This gives a huge performance improvement to builds with very large numbers of modules (in some cases, more than a 2x speedup was observed). llvm-svn: 246582 --- clang/lib/Serialization/Module.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'clang/lib/Serialization/Module.cpp') diff --git a/clang/lib/Serialization/Module.cpp b/clang/lib/Serialization/Module.cpp index 9111fc4..4884f0b 100644 --- a/clang/lib/Serialization/Module.cpp +++ b/clang/lib/Serialization/Module.cpp @@ -45,13 +45,6 @@ ModuleFile::ModuleFile(ModuleKind Kind, unsigned Generation) {} ModuleFile::~ModuleFile() { - for (DeclContextInfosMap::iterator I = DeclContextInfos.begin(), - E = DeclContextInfos.end(); - I != E; ++I) { - if (I->second.NameLookupTableData) - delete I->second.NameLookupTableData; - } - delete static_cast(IdentifierLookupTable); delete static_cast(HeaderFileInfoTable); delete static_cast(SelectorLookupTable); -- cgit v1.1