@@ -4186,35 +4186,12 @@ void ASTReader::PassInterestingDeclsToConsumer() {
4186
4186
GetDecl (ID);
4187
4187
EagerlyDeserializedDecls.clear ();
4188
4188
4189
- auto ConsumingPotentialInterestingDecls = [this ]() {
4190
- while (!PotentiallyInterestingDecls.empty ()) {
4191
- Decl *D = PotentiallyInterestingDecls.front ();
4192
- PotentiallyInterestingDecls.pop_front ();
4193
- if (isConsumerInterestedIn (D))
4194
- PassInterestingDeclToConsumer (D);
4195
- }
4196
- };
4197
- std::deque<Decl *> MaybeInterestingDecls =
4198
- std::move (PotentiallyInterestingDecls);
4199
- assert (PotentiallyInterestingDecls.empty ());
4200
- while (!MaybeInterestingDecls.empty ()) {
4201
- Decl *D = MaybeInterestingDecls.front ();
4202
- MaybeInterestingDecls.pop_front ();
4203
- // Since we load the variable's initializers lazily, it'd be problematic
4204
- // if the initializers dependent on each other. So here we try to load the
4205
- // initializers of static variables to make sure they are passed to code
4206
- // generator by order. If we read anything interesting, we would consume
4207
- // that before emitting the current declaration.
4208
- if (auto *VD = dyn_cast<VarDecl>(D);
4209
- VD && VD->isFileVarDecl () && !VD->isExternallyVisible ())
4210
- VD->getInit ();
4211
- ConsumingPotentialInterestingDecls ();
4189
+ while (!PotentiallyInterestingDecls.empty ()) {
4190
+ Decl *D = PotentiallyInterestingDecls.front ();
4191
+ PotentiallyInterestingDecls.pop_front ();
4212
4192
if (isConsumerInterestedIn (D))
4213
4193
PassInterestingDeclToConsumer (D);
4214
4194
}
4215
-
4216
- // If we add any new potential interesting decl in the last call, consume it.
4217
- ConsumingPotentialInterestingDecls ();
4218
4195
}
4219
4196
4220
4197
void ASTReader::loadDeclUpdateRecords (PendingUpdateRecord &Record) {
0 commit comments