[clang] 6eda66b - PR50294: Fix a performance regression from 2c9dbcd.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 1 18:20:39 PDT 2021
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) {
More information about the cfe-commits
mailing list