mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Frontend] Remove performParseOnly
Most clients were only using it to populate the main module with files, which is now done by `getMainModule`. Instead, they can now just rely on parsing happening lazily.
This commit is contained in:
@@ -636,9 +636,6 @@ int parseFile(
|
||||
assert(BufferIDs.size() == 1 && "Only expecting to process one source file");
|
||||
unsigned BufferID = BufferIDs.front();
|
||||
|
||||
// Parse the actual source file
|
||||
Instance.performParseOnly();
|
||||
|
||||
SourceFile *SF = nullptr;
|
||||
for (auto Unit : Instance.getMainModule()->getFiles()) {
|
||||
SF = dyn_cast<SourceFile>(Unit);
|
||||
@@ -648,6 +645,9 @@ int parseFile(
|
||||
}
|
||||
assert(SF && "No source file");
|
||||
|
||||
// Force parsing to populate the syntax cache.
|
||||
(void)SF->getSyntaxRoot();
|
||||
|
||||
// In case the action specific callback succeeds, we output this error code
|
||||
int InternalExitCode = EXIT_SUCCESS;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user