[MachineOutliner] NFC - simplify -moutline/-mno-outline logic

It's a bit cleaner to use `hasFlag` instead of nested ifs. This
just refactors the -moutline/-mno-outline logic to use that.

llvm-svn: 335549
This commit is contained in:
Jessica Paquette 2018-06-25 23:20:18 +00:00
parent 48c4885fe7
commit b9d5ee568a
1 changed files with 9 additions and 12 deletions

View File

@ -1477,9 +1477,7 @@ void Clang::AddAArch64TargetArgs(const ArgList &Args,
CmdArgs.push_back("-aarch64-enable-global-merge=true");
}
if (Arg *A = Args.getLastArg(options::OPT_moutline,
options::OPT_mno_outline)) {
if (A->getOption().matches(options::OPT_moutline)) {
if (Args.hasFlag(options::OPT_moutline, options::OPT_mno_outline, false)) {
CmdArgs.push_back("-mllvm");
CmdArgs.push_back("-enable-machine-outliner");
@ -1492,7 +1490,6 @@ void Clang::AddAArch64TargetArgs(const ArgList &Args,
}
}
}
}
void Clang::AddMIPSTargetArgs(const ArgList &Args,
ArgStringList &CmdArgs) const {