Merge pull request #31721 from CodaFi/const-of-proportionality

Const-Qualify LangOptions and TypeCheckerOptions
This commit is contained in:
Robert Widmann
2020-05-13 13:36:15 -07:00
committed by GitHub
28 changed files with 151 additions and 98 deletions

View File

@@ -1200,12 +1200,7 @@ static bool performCompile(CompilerInstance &Instance,
FrontendObserver *observer) {
const auto &Invocation = Instance.getInvocation();
const auto &opts = Invocation.getFrontendOptions();
FrontendOptions::ActionType Action = opts.RequestedAction;
if (Action == FrontendOptions::ActionType::EmitSyntax) {
Instance.getASTContext().LangOpts.BuildSyntaxTree = true;
Instance.getASTContext().LangOpts.VerifySyntaxTree = true;
}
const FrontendOptions::ActionType Action = opts.RequestedAction;
// We've been asked to precompile a bridging header or module; we want to
// avoid touching any other inputs and just parse, emit and exit.