[lld] r338596 - Simplify. NFC.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 1 10:35:27 PDT 2018
Is this NFC? It looks like you've changed the startswith to an exact
comparison.
Peter
On Wed, Aug 1, 2018 at 10:33 AM Rui Ueyama via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> 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;
> }
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
--
--
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180801/9dfc2784/attachment.html>
More information about the llvm-commits
mailing list