Driver: Update -O -> -O2 replacement for addition of -O0 option.

llvm-svn: 104823
This commit is contained in:
Daniel Dunbar 2010-05-27 06:51:08 +00:00
parent bf8c519a0d
commit 9296f63ff0
1 changed files with 2 additions and 1 deletions

View File

@ -1046,7 +1046,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
if (Arg *A = Args.getLastArg(options::OPT_O_Group)) {
if (A->getOption().matches(options::OPT_O4))
CmdArgs.push_back("-O3");
else if (A->getValue(Args)[0] == '\0')
else if (A->getOption().matches(options::OPT_O) &&
A->getValue(Args)[0] == '\0')
CmdArgs.push_back("-O2");
else
A->render(Args, CmdArgs);