@@ -1434,8 +1434,6 @@ DirectLookupRequest::evaluate(Evaluator &evaluator,
14341434 ASTContext &ctx = decl->getASTContext ();
14351435 const bool useNamedLazyMemberLoading = (ctx.LangOpts .NamedLazyMemberLoading &&
14361436 decl->hasLazyMembers ());
1437- const bool disableAdditionalExtensionLoading =
1438- flags.contains (NominalTypeDecl::LookupDirectFlags::IgnoreNewExtensions);
14391437 const bool includeAttrImplements =
14401438 flags.contains (NominalTypeDecl::LookupDirectFlags::IncludeAttrImplements);
14411439
@@ -1451,35 +1449,27 @@ DirectLookupRequest::evaluate(Evaluator &evaluator,
14511449 // If we're allowed to load extensions, call prepareExtensions to ensure we
14521450 // properly invalidate the lazily-complete cache for any extensions brought in
14531451 // by modules loaded after-the-fact. This can happen with the LLDB REPL.
1454- if (!disableAdditionalExtensionLoading)
1455- decl->prepareExtensions ();
1452+ decl->prepareExtensions ();
14561453
14571454 auto &Table = *decl->LookupTable ;
14581455 if (!useNamedLazyMemberLoading) {
14591456 // Make sure we have the complete list of members (in this nominal and in
14601457 // all extensions).
14611458 (void )decl->getMembers ();
14621459
1463- if (!disableAdditionalExtensionLoading) {
1464- for (auto E : decl->getExtensions ())
1465- (void )E->getMembers ();
1460+ for (auto E : decl->getExtensions ())
1461+ (void )E->getMembers ();
14661462
1467- Table.updateLookupTable (decl);
1468- }
1463+ Table.updateLookupTable (decl);
14691464 } else if (!Table.isLazilyComplete (name.getBaseName ())) {
14701465 // The lookup table believes it doesn't have a complete accounting of this
14711466 // name - either because we're never seen it before, or another extension
14721467 // was registered since the last time we searched. Ask the loaders to give
14731468 // us a hand.
14741469 DeclBaseName baseName (name.getBaseName ());
14751470 populateLookupTableEntryFromLazyIDCLoader (ctx, Table, baseName, decl);
1471+ populateLookupTableEntryFromExtensions (ctx, Table, baseName, decl);
14761472
1477- if (!disableAdditionalExtensionLoading) {
1478- populateLookupTableEntryFromExtensions (ctx, Table, baseName, decl);
1479- }
1480-
1481- // FIXME: If disableAdditionalExtensionLoading is true, we should
1482- // not mark the entry as complete.
14831473 Table.markLazilyComplete (baseName);
14841474 }
14851475
0 commit comments