mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
NFC: Rename NameBinding to ImportResolution
This commit is contained in:
@@ -752,7 +752,7 @@ shouldImplicityImportSwiftOnoneSupportModule(CompilerInvocation &Invocation) {
|
||||
}
|
||||
|
||||
void CompilerInstance::performParseAndResolveImportsOnly() {
|
||||
performSemaUpTo(SourceFile::NameBound);
|
||||
performSemaUpTo(SourceFile::ImportsResolved);
|
||||
}
|
||||
|
||||
void CompilerInstance::performSema() {
|
||||
@@ -926,12 +926,12 @@ void CompilerInstance::parseAndCheckTypesUpTo(
|
||||
auto *SF = dyn_cast<SourceFile>(File);
|
||||
if (!SF)
|
||||
return true;
|
||||
return SF->ASTStage >= SourceFile::NameBound;
|
||||
return SF->ASTStage >= SourceFile::ImportsResolved;
|
||||
}) && "some files have not yet had their imports resolved");
|
||||
MainModule->setHasResolvedImports();
|
||||
|
||||
forEachFileToTypeCheck([&](SourceFile &SF) {
|
||||
if (limitStage == SourceFile::NameBound) {
|
||||
if (limitStage == SourceFile::ImportsResolved) {
|
||||
bindExtensions(SF);
|
||||
return;
|
||||
}
|
||||
@@ -951,8 +951,8 @@ void CompilerInstance::parseAndCheckTypesUpTo(
|
||||
}
|
||||
});
|
||||
|
||||
// If the limiting AST stage is name binding, we're done.
|
||||
if (limitStage <= SourceFile::NameBound) {
|
||||
// If the limiting AST stage is import resolution, we're done.
|
||||
if (limitStage <= SourceFile::ImportsResolved) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -967,8 +967,8 @@ void CompilerInstance::parseLibraryFile(
|
||||
SourceFileKind::Library, implicitImports.kind, BufferID);
|
||||
addAdditionalInitialImportsTo(NextInput, implicitImports);
|
||||
|
||||
// Name binding will lazily trigger parsing of the file.
|
||||
performNameBinding(*NextInput);
|
||||
// Import resolution will lazily trigger parsing of the file.
|
||||
performImportResolution(*NextInput);
|
||||
}
|
||||
|
||||
bool CompilerInstance::parsePartialModulesAndLibraryFiles(
|
||||
@@ -997,7 +997,7 @@ bool CompilerInstance::parsePartialModulesAndLibraryFiles(
|
||||
|
||||
void CompilerInstance::parseAndTypeCheckMainFileUpTo(
|
||||
SourceFile::ASTStage_t LimitStage) {
|
||||
assert(LimitStage >= SourceFile::NameBound);
|
||||
assert(LimitStage >= SourceFile::ImportsResolved);
|
||||
FrontendStatsTracer tracer(getStatsReporter(),
|
||||
"parse-and-typecheck-main-file");
|
||||
bool mainIsPrimary =
|
||||
@@ -1010,13 +1010,13 @@ void CompilerInstance::parseAndTypeCheckMainFileUpTo(
|
||||
auto DidSuppressWarnings = Diags.getSuppressWarnings();
|
||||
Diags.setSuppressWarnings(DidSuppressWarnings || !mainIsPrimary);
|
||||
|
||||
// For a primary, perform type checking if needed. Otherwise, just do name
|
||||
// binding.
|
||||
// For a primary, perform type checking if needed. Otherwise, just do import
|
||||
// resolution.
|
||||
if (mainIsPrimary && LimitStage >= SourceFile::TypeChecked) {
|
||||
performTypeChecking(MainFile);
|
||||
} else {
|
||||
assert(!TheSILModule && "Should perform type checking for SIL");
|
||||
performNameBinding(MainFile);
|
||||
performImportResolution(MainFile);
|
||||
}
|
||||
|
||||
// Parse the SIL decls if needed.
|
||||
|
||||
Reference in New Issue
Block a user