[lld] r280533 - Simplify. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 2 12:49:27 PDT 2016
Author: ruiu
Date: Fri Sep 2 14:49:27 2016
New Revision: 280533
URL: http://llvm.org/viewvc/llvm-project?rev=280533&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=280533&r1=280532&r2=280533&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Fri Sep 2 14:49:27 2016
@@ -356,17 +356,11 @@ static DiscardPolicy getDiscardOption(op
Args.getLastArg(OPT_discard_all, OPT_discard_locals, OPT_discard_none);
if (!Arg)
return DiscardPolicy::Default;
-
- switch (Arg->getOption().getID()) {
- case OPT_discard_all:
+ if (Arg->getOption().getID() == OPT_discard_all)
return DiscardPolicy::All;
- case OPT_discard_locals:
+ if (Arg->getOption().getID() == OPT_discard_locals)
return DiscardPolicy::Locals;
- case OPT_discard_none:
- return DiscardPolicy::None;
- default:
- llvm_unreachable("unknown discard option");
- }
+ return DiscardPolicy::None;
}
static StripPolicy getStripOption(opt::InputArgList &Args) {
More information about the llvm-commits
mailing list