@@ -75,8 +75,8 @@ struct UnboundImport {
75
75
// / If this is a scoped import, the names of the declaration being imported;
76
76
// / otherwise empty. (Currently the compiler doesn't support nested scoped
77
77
// / imports, so there should always be zero or one elements, but
78
- // / \c AccessPathTy is the common currency type for this.)
79
- ImportPath::Access declPath ;
78
+ // / \c ImportPath::Access is the common currency type for this.)
79
+ ImportPath::Access accessPath ;
80
80
81
81
// Names of explicitly imported SPI groups via @_spi.
82
82
ArrayRef<Identifier> spiGroups;
@@ -141,7 +141,7 @@ struct UnboundImport {
141
141
// / Create an \c ImportedModuleDesc from the information in this
142
142
// / UnboundImport.
143
143
ImportedModuleDesc makeDesc (ModuleDecl *module ) const {
144
- return ImportedModuleDesc ({ declPath , module }, options,
144
+ return ImportedModuleDesc ({ accessPath , module }, options,
145
145
privateImportFileName, spiGroups);
146
146
}
147
147
@@ -501,7 +501,7 @@ ModuleImplicitImportsRequest::evaluate(Evaluator &evaluator,
501
501
// / Create an UnboundImport for a user-written import declaration.
502
502
UnboundImport::UnboundImport (ImportDecl *ID)
503
503
: importLoc(ID->getLoc ()), options(), privateImportFileName(),
504
- modulePath(ID->getModulePath ()), declPath (ID->getDeclPath ()),
504
+ modulePath(ID->getModulePath ()), accessPath (ID->getAccessPath ()),
505
505
importOrUnderlyingModuleDecl(ID)
506
506
{
507
507
if (ID->isExported ())
@@ -850,34 +850,34 @@ ScopedImportLookupRequest::evaluate(Evaluator &evaluator,
850
850
// / we've performed import resolution, since that can introduce additional
851
851
// / imports (such as cross-import overlays) which could provide the declaration.
852
852
auto &ctx = module ->getASTContext ();
853
- auto declPath = import ->getDeclPath ();
853
+ auto accessPath = import ->getAccessPath ();
854
854
auto modulePath = import ->getModulePath ();
855
855
auto *topLevelModule = module ->getTopLevelModule ();
856
856
857
857
// Lookup the referenced decl in the top-level module. This is necessary as
858
858
// the Clang importer currently handles submodules by importing their decls
859
859
// into the top-level module.
860
860
// FIXME: Doesn't handle scoped testable imports correctly.
861
- assert (declPath .size () == 1 && " can't handle sub-decl imports" );
861
+ assert (accessPath .size () == 1 && " can't handle sub-decl imports" );
862
862
SmallVector<ValueDecl *, 8 > decls;
863
- lookupInModule (topLevelModule, declPath .front ().Item , decls,
863
+ lookupInModule (topLevelModule, accessPath .front ().Item , decls,
864
864
NLKind::QualifiedLookup, ResolutionKind::Overloadable,
865
865
import ->getDeclContext ()->getModuleScopeContext ());
866
866
867
867
auto importLoc = import ->getLoc ();
868
868
if (decls.empty ()) {
869
869
ctx.Diags .diagnose (importLoc, diag::decl_does_not_exist_in_module,
870
870
static_cast <unsigned >(importKind),
871
- declPath .front ().Item , modulePath.front ().Item )
872
- .highlight (declPath .getSourceRange ());
871
+ accessPath .front ().Item , modulePath.front ().Item )
872
+ .highlight (accessPath .getSourceRange ());
873
873
return ArrayRef<ValueDecl *>();
874
874
}
875
875
876
876
Optional<ImportKind> actualKind = ImportDecl::findBestImportKind (decls);
877
877
if (!actualKind.hasValue ()) {
878
878
// FIXME: print entire module name?
879
879
ctx.Diags .diagnose (importLoc, diag::ambiguous_decl_in_module,
880
- declPath .front ().Item , module ->getName ());
880
+ accessPath .front ().Item , module ->getName ());
881
881
for (auto next : decls)
882
882
ctx.Diags .diagnose (next, diag::found_candidate);
883
883
@@ -899,7 +899,7 @@ ScopedImportLookupRequest::evaluate(Evaluator &evaluator,
899
899
} else {
900
900
emittedDiag.emplace (ctx.Diags .diagnose (
901
901
importLoc, diag::imported_decl_is_wrong_kind,
902
- declPath .front ().Item , getImportKindString (importKind),
902
+ accessPath .front ().Item , getImportKindString (importKind),
903
903
static_cast <unsigned >(*actualKind)));
904
904
}
905
905
@@ -940,7 +940,7 @@ UnboundImport::UnboundImport(ASTContext &ctx, const UnboundImport &base,
940
940
.copyTo(ctx)),
941
941
// If the declaring import was scoped, inherit that scope in the
942
942
// overlay's import.
943
- declPath (declaringImport.module .accessPath),
943
+ accessPath (declaringImport.module .accessPath),
944
944
importOrUnderlyingModuleDecl(declaringImport.module .importedModule)
945
945
{
946
946
// A cross-import is never private or testable, and never comes from a private
0 commit comments