Skip to content

Commit 912b154

Browse files
authored
Revert "[C++20][Modules][Serialization] Delay marking pending incompl… (llvm#127136)
…ete decl chains until the end of `finishPendingActions`. (llvm#121245)" This reverts commit a9e249f. Reverting this change because of issue llvm#126973.
1 parent 6d3bfdd commit 912b154

File tree

2 files changed

+13
-105
lines changed

2 files changed

+13
-105
lines changed

clang/lib/Serialization/ASTReader.cpp

+13-12
Original file line numberDiff line numberDiff line change
@@ -10188,12 +10188,12 @@ void ASTReader::visitTopLevelModuleMaps(
1018810188
}
1018910189

1019010190
void ASTReader::finishPendingActions() {
10191-
while (!PendingIdentifierInfos.empty() ||
10192-
!PendingDeducedFunctionTypes.empty() ||
10193-
!PendingDeducedVarTypes.empty() || !PendingDeclChains.empty() ||
10194-
!PendingMacroIDs.empty() || !PendingDeclContextInfos.empty() ||
10195-
!PendingUpdateRecords.empty() ||
10196-
!PendingObjCExtensionIvarRedeclarations.empty()) {
10191+
while (
10192+
!PendingIdentifierInfos.empty() || !PendingDeducedFunctionTypes.empty() ||
10193+
!PendingDeducedVarTypes.empty() || !PendingIncompleteDeclChains.empty() ||
10194+
!PendingDeclChains.empty() || !PendingMacroIDs.empty() ||
10195+
!PendingDeclContextInfos.empty() || !PendingUpdateRecords.empty() ||
10196+
!PendingObjCExtensionIvarRedeclarations.empty()) {
1019710197
// If any identifiers with corresponding top-level declarations have
1019810198
// been loaded, load those declarations now.
1019910199
using TopLevelDeclsMap =
@@ -10241,6 +10241,13 @@ void ASTReader::finishPendingActions() {
1024110241
}
1024210242
PendingDeducedVarTypes.clear();
1024310243

10244+
// For each decl chain that we wanted to complete while deserializing, mark
10245+
// it as "still needs to be completed".
10246+
for (unsigned I = 0; I != PendingIncompleteDeclChains.size(); ++I) {
10247+
markIncompleteDeclChain(PendingIncompleteDeclChains[I]);
10248+
}
10249+
PendingIncompleteDeclChains.clear();
10250+
1024410251
// Load pending declaration chains.
1024510252
for (unsigned I = 0; I != PendingDeclChains.size(); ++I)
1024610253
loadPendingDeclChain(PendingDeclChains[I].first,
@@ -10478,12 +10485,6 @@ void ASTReader::finishPendingActions() {
1047810485
for (auto *ND : PendingMergedDefinitionsToDeduplicate)
1047910486
getContext().deduplicateMergedDefinitonsFor(ND);
1048010487
PendingMergedDefinitionsToDeduplicate.clear();
10481-
10482-
// For each decl chain that we wanted to complete while deserializing, mark
10483-
// it as "still needs to be completed".
10484-
for (Decl *D : PendingIncompleteDeclChains)
10485-
markIncompleteDeclChain(D);
10486-
PendingIncompleteDeclChains.clear();
1048710488
}
1048810489

1048910490
void ASTReader::diagnoseOdrViolations() {

clang/test/Modules/pr121245.cpp

-93
This file was deleted.

0 commit comments

Comments
 (0)