Author: Richard Smith Date: 2021-09-01T18:00:07-07:00 New Revision: 6eda66b0a9f793c65852aa94430ae9bd891bcf63
URL: https://github.com/llvm/llvm-project/commit/6eda66b0a9f793c65852aa94430ae9bd891bcf63 DIFF: https://github.com/llvm/llvm-project/commit/6eda66b0a9f793c65852aa94430ae9bd891bcf63.diff LOG: PR50294: Fix a performance regression from 2c9dbcd. Per the contract of ReadLateParsedTemplates, we should not be returning the same results multiple times. No functionality change intended, other than to runtime. Thanks to Luboš Luňák for identifying the cause of the regression! Added: Modified: clang/lib/Serialization/ASTReader.cpp Removed: ################################################################################ diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index 128350ce9ff8f..dfa7d55af735d 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -8412,6 +8412,8 @@ void ASTReader::ReadLateParsedTemplates( LPTMap.insert(std::make_pair(FD, std::move(LT))); } } + + LateParsedTemplates.clear(); } void ASTReader::LoadSelector(Selector Sel) { _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits