[lld] r338596 - Simplify. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 1 10:33:00 PDT 2018
Author: ruiu
Date: Wed Aug 1 10:33:00 2018
New Revision: 338596
URL: http://llvm.org/viewvc/llvm-project?rev=338596&view=rev
Log:
Simplify. NFC.
Modified:
lld/trunk/ELF/Driver.cpp
Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=338596&r1=338595&r2=338596&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Wed Aug 1 10:33:00 2018
@@ -497,14 +497,11 @@ static Target2Policy getTarget2(opt::Inp
}
static bool isOutputFormatBinary(opt::InputArgList &Args) {
- if (auto *Arg = Args.getLastArg(OPT_oformat)) {
- StringRef S = Arg->getValue();
- if (S == "binary")
- return true;
- if (S.startswith("elf"))
- return false;
+ StringRef S = Args.getLastArgValue(OPT_oformat, "elf");
+ if (S == "binary")
+ return true;
+ if (S != "elf")
error("unknown --oformat value: " + S);
- }
return false;
}
More information about the llvm-commits
mailing list