mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Pull out performWholeModuleTypeCheckingOnMainModule
This commit is contained in:
@@ -435,6 +435,7 @@ public:
|
|||||||
void freeContextAndSIL();
|
void freeContextAndSIL();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void performWholeModuleTypeCheckingOnMainModule();
|
||||||
void finishTypeCheckingMainModule();
|
void finishTypeCheckingMainModule();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -569,16 +569,18 @@ void CompilerInstance::performSema() {
|
|||||||
Invocation.getCodeCompletionFactory());
|
Invocation.getCodeCompletionFactory());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Perform whole-module type checking.
|
|
||||||
if (TypeCheckOptions & TypeCheckingFlags::DelayWholeModuleChecking) {
|
if (TypeCheckOptions & TypeCheckingFlags::DelayWholeModuleChecking) {
|
||||||
for (auto File : MainModule->getFiles())
|
performWholeModuleTypeCheckingOnMainModule();
|
||||||
if (auto SF = dyn_cast<SourceFile>(File))
|
|
||||||
performWholeModuleTypeChecking(*SF);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
finishTypeCheckingMainModule();
|
finishTypeCheckingMainModule();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CompilerInstance::performWholeModuleTypeCheckingOnMainModule() {
|
||||||
|
for (auto File : MainModule->getFiles())
|
||||||
|
if (auto SF = dyn_cast<SourceFile>(File))
|
||||||
|
performWholeModuleTypeChecking(*SF);
|
||||||
|
}
|
||||||
|
|
||||||
void CompilerInstance::finishTypeCheckingMainModule() {
|
void CompilerInstance::finishTypeCheckingMainModule() {
|
||||||
for (auto File : MainModule->getFiles())
|
for (auto File : MainModule->getFiles())
|
||||||
if (auto SF = dyn_cast<SourceFile>(File))
|
if (auto SF = dyn_cast<SourceFile>(File))
|
||||||
|
|||||||
Reference in New Issue
Block a user