[lld] r273771 - Do not lookup the same option twice. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 24 21:37:56 PDT 2016
Author: ruiu
Date: Fri Jun 24 23:37:56 2016
New Revision: 273771
URL: http://llvm.org/viewvc/llvm-project?rev=273771&view=rev
Log:
Do not lookup the same option twice. 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=273771&r1=273770&r2=273771&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Fri Jun 24 23:37:56 2016
@@ -236,8 +236,8 @@ static int getInteger(opt::InputArgList
}
static const char *getReproduceOption(opt::InputArgList &Args) {
- if (Args.hasArg(OPT_reproduce))
- return Args.getLastArg(OPT_reproduce)->getValue();
+ if (auto *Arg = Args.getLastArg(OPT_reproduce))
+ return Arg->getValue();
return getenv("LLD_REPRODUCE");
}
More information about the llvm-commits
mailing list