[Frontend] Remove parsing option params from performParseOnly

Lift the `DisablePoundIfEvaluation` parsing option
into `LangOptions` to subsume the need for the
`EvaluateConditionals` parameter, and sink the
computation of `CanDelayBodies` down into
`createSourceFileForMainModule`.
This commit is contained in:
Hamish Knight
2020-06-08 12:44:13 -07:00
parent 81483cc050
commit 5d72c464eb
12 changed files with 47 additions and 33 deletions

View File

@@ -609,7 +609,10 @@ int parseFile(
Invocation.getLangOptions().ParseForSyntaxTreeOnly = true;
Invocation.getLangOptions().VerifySyntaxTree = options::VerifySyntaxTree;
Invocation.getLangOptions().RequestEvaluatorGraphVizPath = options::GraphVisPath;
Invocation.getLangOptions().DisablePoundIfEvaluation = true;
Invocation.getFrontendOptions().InputsAndOutputs.addInputFile(InputFileName);
if (InputFileName.endswith(".swiftinterface"))
Invocation.setInputKind(InputFileKind::SwiftModuleInterface);
Invocation.setMainExecutablePath(