[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:
Hamish Knight
2020-06-08 12:44:15 -07:00
parent 7824dc1048
commit 1ed810653c
11 changed files with 34 additions and 42 deletions

View File

@@ -240,10 +240,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 reportSyntacticAnnotations(CompilerInstance &CI,