[C++20][Modules][Serialization] Delay marking pending incomplete decl… · swiftlang/llvm-project@a9e249f (original) (raw)
`@@ -10186,12 +10186,12 @@ void ASTReader::visitTopLevelModuleMaps(
`
10186
10186
`}
`
10187
10187
``
10188
10188
`void ASTReader::finishPendingActions() {
`
10189
``
`-
while (
`
10190
``
`-
!PendingIdentifierInfos.empty() || !PendingDeducedFunctionTypes.empty() ||
`
10191
``
`-
!PendingDeducedVarTypes.empty() || !PendingIncompleteDeclChains.empty() ||
`
10192
``
`-
!PendingDeclChains.empty() || !PendingMacroIDs.empty() ||
`
10193
``
`-
!PendingDeclContextInfos.empty() || !PendingUpdateRecords.empty() ||
`
10194
``
`-
!PendingObjCExtensionIvarRedeclarations.empty()) {
`
``
10189
`+
while (!PendingIdentifierInfos.empty() ||
`
``
10190
`+
!PendingDeducedFunctionTypes.empty() ||
`
``
10191
`+
!PendingDeducedVarTypes.empty() || !PendingDeclChains.empty() ||
`
``
10192
`+
!PendingMacroIDs.empty() || !PendingDeclContextInfos.empty() ||
`
``
10193
`+
!PendingUpdateRecords.empty() ||
`
``
10194
`+
!PendingObjCExtensionIvarRedeclarations.empty()) {
`
10195
10195
`// If any identifiers with corresponding top-level declarations have
`
10196
10196
`// been loaded, load those declarations now.
`
10197
10197
`using TopLevelDeclsMap =
`
`@@ -10239,13 +10239,6 @@ void ASTReader::finishPendingActions() {
`
10239
10239
` }
`
10240
10240
` PendingDeducedVarTypes.clear();
`
10241
10241
``
10242
``
`-
// For each decl chain that we wanted to complete while deserializing, mark
`
10243
``
`-
// it as "still needs to be completed".
`
10244
``
`-
for (unsigned I = 0; I != PendingIncompleteDeclChains.size(); ++I) {
`
10245
``
`-
markIncompleteDeclChain(PendingIncompleteDeclChains[I]);
`
10246
``
`-
}
`
10247
``
`-
PendingIncompleteDeclChains.clear();
`
10248
``
-
10249
10242
`// Load pending declaration chains.
`
10250
10243
`for (unsigned I = 0; I != PendingDeclChains.size(); ++I)
`
10251
10244
`loadPendingDeclChain(PendingDeclChains[I].first,
`
`@@ -10483,6 +10476,12 @@ void ASTReader::finishPendingActions() {
`
10483
10476
`for (auto *ND : PendingMergedDefinitionsToDeduplicate)
`
10484
10477
`getContext().deduplicateMergedDefinitonsFor(ND);
`
10485
10478
` PendingMergedDefinitionsToDeduplicate.clear();
`
``
10479
+
``
10480
`+
// For each decl chain that we wanted to complete while deserializing, mark
`
``
10481
`+
// it as "still needs to be completed".
`
``
10482
`+
for (Decl *D : PendingIncompleteDeclChains)
`
``
10483
`+
markIncompleteDeclChain(D);
`
``
10484
`+
PendingIncompleteDeclChains.clear();
`
10486
10485
`}
`
10487
10486
``
10488
10487
`void ASTReader::diagnoseOdrViolations() {
`