mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +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:
@@ -814,10 +814,7 @@ static bool makeParserAST(CompilerInstance &CI, StringRef Text,
|
||||
Buf = llvm::MemoryBuffer::getMemBuffer(Text, "<module-interface>");
|
||||
Invocation.getFrontendOptions().InputsAndOutputs.addInput(
|
||||
InputFile(Buf.get()->getBufferIdentifier(), false, Buf.get()));
|
||||
if (CI.setup(Invocation))
|
||||
return true;
|
||||
CI.performParseOnly();
|
||||
return false;
|
||||
return CI.setup(Invocation);
|
||||
}
|
||||
|
||||
static void collectFuncEntities(std::vector<TextEntity> &Ents,
|
||||
@@ -1407,7 +1404,6 @@ SourceFile *SwiftLangSupport::getSyntacticSourceFile(
|
||||
Error = "Compiler invocation set up failed";
|
||||
return nullptr;
|
||||
}
|
||||
ParseCI.performParseOnly();
|
||||
|
||||
SourceFile *SF = nullptr;
|
||||
unsigned BufferID = ParseCI.getInputBufferIDs().back();
|
||||
|
||||
Reference in New Issue
Block a user