mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add a -sil-opt-pass-count frontend flag.
Until our SIL printing and parsing is robust enough to round-trip, this is useful for bisecting optimizer issues. Swift SVN r14061
This commit is contained in:
@@ -618,7 +618,14 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (const Arg *A = Args.getLastArg(OPT_sil_opt_pass_count)) {
|
||||
if (StringRef(A->getValue()).getAsInteger(10, Opts.NumOptPassesToRun)) {
|
||||
Diags.diagnose(SourceLoc(), diag::error_invalid_arg_value,
|
||||
A->getAsString(Args), A->getValue());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (const Arg *A = Args.getLastArg(OPT_disable_sil_linking,
|
||||
OPT_sil_link_all)) {
|
||||
if (A->getOption().matches(OPT_disable_sil_linking))
|
||||
|
||||
Reference in New Issue
Block a user