revert 188352

llvm-svn: 188353
This commit is contained in:
Shuxin Yang 2013-08-14 04:47:39 +00:00
parent 538a17691c
commit 5f22d5263a
1 changed files with 3 additions and 5 deletions

View File

@ -1339,10 +1339,6 @@ Action *Driver::ConstructPhaseAction(const ArgList &Args, phases::ID Phase,
types::ID Output =
Args.hasArg(options::OPT_S) ? types::TY_LTO_IR : types::TY_LTO_BC;
return new CompileJobAction(Input, Output);
} else if (Args.hasArg(options::OPT_emit_llvm)) {
types::ID Output =
Args.hasArg(options::OPT_S) ? types::TY_LLVM_IR : types::TY_LLVM_BC;
return new CompileJobAction(Input, Output);
} else {
return new CompileJobAction(Input, types::TY_PP_Asm);
}
@ -1355,7 +1351,9 @@ Action *Driver::ConstructPhaseAction(const ArgList &Args, phases::ID Phase,
}
bool Driver::IsUsingLTO(const ArgList &Args) const {
if (Args.hasFlag(options::OPT_flto, options::OPT_fno_lto, false))
// Check for -emit-llvm or -flto.
if (Args.hasArg(options::OPT_emit_llvm) ||
Args.hasFlag(options::OPT_flto, options::OPT_fno_lto, false))
return true;
// Check for -O4.