[lld] r248837 - ELF2: Assign bool values directly. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 15:33:19 PDT 2015
Author: ruiu
Date: Tue Sep 29 17:33:18 2015
New Revision: 248837
URL: http://llvm.org/viewvc/llvm-project?rev=248837&view=rev
Log:
ELF2: Assign bool values directly. 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=248837&r1=248836&r2=248837&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Tue Sep 29 17:33:18 2015
@@ -117,30 +117,17 @@ void LinkerDriver::link(ArrayRef<const c
for (auto *Arg : Args.filtered(OPT_L))
Config->InputSearchPaths.push_back(Arg->getValue());
- if (Args.hasArg(OPT_shared))
- Config->Shared = true;
-
- if (Args.hasArg(OPT_discard_all))
- Config->DiscardAll = true;
-
- if (Args.hasArg(OPT_discard_locals))
- Config->DiscardLocals = true;
-
- if (Args.hasArg(OPT_discard_none))
- Config->DiscardNone = true;
-
- if (Args.hasArg(OPT_export_dynamic))
- Config->ExportDynamic = true;
-
- if (Args.hasArg(OPT_noinhibit_exec))
- Config->NoInhibitExec = true;
-
- if (Args.hasArg(OPT_allow_multiple_definition))
- Config->AllowMultipleDefinition = true;
-
if (auto *Arg = Args.getLastArg(OPT_entry))
Config->Entry = Arg->getValue();
+ Config->AllowMultipleDefinition = Args.hasArg(OPT_allow_multiple_definition);
+ Config->DiscardAll = Args.hasArg(OPT_discard_all);
+ Config->DiscardLocals = Args.hasArg(OPT_discard_locals);
+ Config->DiscardNone = Args.hasArg(OPT_discard_none);
+ Config->ExportDynamic = Args.hasArg(OPT_export_dynamic);
+ Config->NoInhibitExec = Args.hasArg(OPT_noinhibit_exec);
+ Config->Shared = Args.hasArg(OPT_shared);
+
// Create a list of input files.
std::vector<MemoryBufferRef> Inputs;
More information about the llvm-commits
mailing list