Minor clean-up of -assert-config option handling.

* Replace 'Fast' with 'Unchecked' everywhere.
* Update the help text to specify DisableReplacement rather than
  Replacement and to document Unchecked.
* Simplify tests slightly and add a tests for Unchecked.
This commit is contained in:
Mark Lacey
2016-02-12 15:06:44 -08:00
parent abbbb66073
commit bd30572f80
6 changed files with 21 additions and 20 deletions

View File

@@ -988,7 +988,7 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
Opts.Optimization = SILOptions::SILOptMode::OptimizeUnchecked;
// Removal of cond_fail (overflow on binary operations).
Opts.RemoveRuntimeAsserts = true;
Opts.AssertConfig = SILOptions::Fast;
Opts.AssertConfig = SILOptions::Unchecked;
} else if (A->getOption().matches(OPT_Oplayground)) {
// For now -Oplayground is equivalent to -Onone.
IRGenOpts.Optimize = false;
@@ -1009,8 +1009,8 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
Opts.AssertConfig = SILOptions::Debug;
} else if (Configuration == "Release") {
Opts.AssertConfig = SILOptions::Release;
} else if (Configuration == "Fast") {
Opts.AssertConfig = SILOptions::Fast;
} else if (Configuration == "Unchecked") {
Opts.AssertConfig = SILOptions::Unchecked;
} else {
Diags.diagnose(SourceLoc(), diag::error_invalid_arg_value,
A->getAsString(Args), A->getValue());