mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Frontend] Separate parse-only functionality into its own function, CompilerInstance::performParseOnly().
Parse-only is a hot path; keep the semantics for it separate from normal parsing, otherwise it is very easy to introduce something expensive without checking for Invocation.getParseOnly(). Also cleans up a bit CompilerInstance::performParse() as well. Swift SVN r17596
This commit is contained in:
@@ -159,9 +159,6 @@ static bool ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
|
||||
Action = FrontendOptions::Parse;
|
||||
} else if (Opt.matches(OPT_dump_parse)) {
|
||||
Action = FrontendOptions::DumpParse;
|
||||
|
||||
// -dump-parse explicitly disables type-checking
|
||||
Opts.ParseOnly = true;
|
||||
} else if (Opt.matches(OPT_dump_ast)) {
|
||||
Action = FrontendOptions::DumpAST;
|
||||
} else if (Opt.matches(OPT_print_ast)) {
|
||||
|
||||
Reference in New Issue
Block a user