mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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:
@@ -234,6 +234,7 @@ static bool makeParserAST(CompilerInstance &CI, StringRef Text,
|
||||
Invocation.getFrontendOptions().InputsAndOutputs.clearInputs();
|
||||
Invocation.setModuleName("main");
|
||||
Invocation.setInputKind(InputFileKind::Swift);
|
||||
Invocation.getLangOptions().DisablePoundIfEvaluation = true;
|
||||
|
||||
std::unique_ptr<llvm::MemoryBuffer> Buf;
|
||||
Buf = llvm::MemoryBuffer::getMemBuffer(Text, "<module-interface>");
|
||||
|
||||
Reference in New Issue
Block a user