Add -O as an alias to -O3. rdar://16782554

Swift SVN r17183
This commit is contained in:
Nadav Rotem
2014-05-01 21:18:19 +00:00
parent 5631834537
commit 2099cd0988

View File

@@ -701,6 +701,9 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
IRGenOpts.DisableAllRuntimeChecks = true;
// Removal of cond_fail (overflow on binary operations).
Opts.RemoveRuntimeAsserts = true;
} else if (!StringRef(A->getValue()).size()) {
// -O is an alias to -O3.
IRGenOpts.OptLevel = MaxLevel;
} else {
unsigned OptLevel;
if (StringRef(A->getValue()).getAsInteger(10, OptLevel) ||