Skip to content

Commit 658d55b

Browse files
committed
[Serialization] Complete only needed partial specializations
It is unclear (to me) why this needs to be done "for safety", but this change significantly improves the effectiveness of lazy loading.
1 parent 670d16c commit 658d55b

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

clang/lib/Serialization/ASTReader.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7891,14 +7891,8 @@ void ASTReader::CompleteRedeclChain(const Decl *D) {
78917891
}
78927892
}
78937893

7894-
if (Template) {
7895-
// For partitial specialization, load all the specializations for safety.
7896-
if (isa<ClassTemplatePartialSpecializationDecl,
7897-
VarTemplatePartialSpecializationDecl>(D))
7898-
Template->loadLazySpecializationsImpl();
7899-
else
7900-
Template->loadLazySpecializationsImpl(Args);
7901-
}
7894+
if (Template)
7895+
Template->loadLazySpecializationsImpl(Args);
79027896
}
79037897

79047898
CXXCtorInitializer **

0 commit comments

Comments
 (0)