File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -3714,22 +3714,19 @@ void ClangImporter::Implementation::lookupAllObjCMembers(
3714
3714
}
3715
3715
}
3716
3716
3717
- // Force the named member of the entire inheritance hierarchy to be loaded and
3717
+ // Force the members of the entire inheritance hierarchy to be loaded and
3718
3718
// deserialized before loading the named member of this class. This allows the
3719
3719
// decl members table to be warmed up and enables the correct identification of
3720
3720
// overrides.
3721
- static void loadNamedMemberOfSuperclassIfNeeded (const ClassDecl *CD,
3722
- DeclBaseName name) {
3721
+ static void ensureSuperclassMembersAreLoaded (const ClassDecl *CD) {
3723
3722
if (!CD)
3724
3723
return ;
3725
3724
3726
3725
CD = CD->getSuperclassDecl ();
3727
3726
if (!CD || !CD->hasClangNode ())
3728
3727
return ;
3729
3728
3730
- auto ci = CD->getASTContext ().getOrCreateLazyIterableContextData (
3731
- CD, /* lazyLoader=*/ nullptr );
3732
- ci->loader ->loadNamedMembers (CD, name, ci->memberData );
3729
+ CD->loadAllMembers ();
3733
3730
}
3734
3731
3735
3732
Optional<TinyPtrVector<ValueDecl *>>
@@ -3793,7 +3790,7 @@ ClangImporter::Implementation::loadNamedMembers(
3793
3790
3794
3791
assert (isa<clang::ObjCContainerDecl>(CD) || isa<clang::NamespaceDecl>(CD));
3795
3792
3796
- loadNamedMemberOfSuperclassIfNeeded (dyn_cast<ClassDecl>(D), N );
3793
+ ensureSuperclassMembersAreLoaded (dyn_cast<ClassDecl>(D));
3797
3794
3798
3795
TinyPtrVector<ValueDecl *> Members;
3799
3796
for (auto entry : table->lookup (SerializedSwiftName (N),
Original file line number Diff line number Diff line change 8
8
// Check that named-lazy-member-loading reduces the number of Decls deserialized
9
9
// RUN: %target-swift-frontend -typecheck -I %S/Inputs/NamedLazyMembers -disable-named-lazy-member-loading -stats-output-dir %t/stats-pre -primary-file %s %S/Inputs/NamedLazyMembers/NamedLazyMembersExt.swift
10
10
// RUN: %target-swift-frontend -typecheck -I %S/Inputs/NamedLazyMembers -stats-output-dir %t/stats-post -primary-file %s %S/Inputs/NamedLazyMembers/NamedLazyMembersExt.swift
11
- // RUN: %{python} %utils/process-stats-dir.py --evaluate-delta 'NumTotalClangImportedEntities < -10 ' %t/stats-pre %t/stats-post
11
+ // RUN: %{python} %utils/process-stats-dir.py --evaluate-delta 'NumTotalClangImportedEntities <= -1 ' %t/stats-pre %t/stats-post
12
12
13
13
import NamedLazyMembers
14
14
You can’t perform that action at this time.
0 commit comments