[lld] r332994 - Simplify. NFC.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue May 22 09:16:09 PDT 2018


Author: ruiu
Date: Tue May 22 09:16:09 2018
New Revision: 332994

URL: http://llvm.org/viewvc/llvm-project?rev=332994&view=rev
Log:
Simplify. NFC.

We can directly assign to a std::pair without std::tie.

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=332994&r1=332993&r2=332994&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Tue May 22 09:16:09 2018
@@ -761,6 +761,10 @@ void LinkerDriver::readConfigs(opt::Inpu
   Config->ThinLTOIndexOnlyArg =
       Args.getLastArgValue(OPT_plugin_opt_thinlto_index_only_eq);
   Config->ThinLTOJobs = args::getInteger(Args, OPT_thinlto_jobs, -1u);
+  Config->ThinLTOObjectSuffixReplace =
+      getOldNewOptions(Args, OPT_plugin_opt_thinlto_object_suffix_replace_eq);
+  Config->ThinLTOPrefixReplace =
+      getOldNewOptions(Args, OPT_plugin_opt_thinlto_prefix_replace_eq);
   ThreadsEnabled = Args.hasFlag(OPT_threads, OPT_no_threads, true);
   Config->Trace = Args.hasArg(OPT_trace);
   Config->Undefined = args::getStrings(Args, OPT_undefined);
@@ -789,15 +793,7 @@ void LinkerDriver::readConfigs(opt::Inpu
   Config->ZText = getZFlag(Args, "text", "notext", true);
   Config->ZWxneeded = hasZOption(Args, "wxneeded");
 
-  // Parse LTO plugin-related options for compatibility with gold.
-  std::tie(Config->ThinLTOPrefixReplace.first,
-           Config->ThinLTOPrefixReplace.second) =
-      getOldNewOptions(Args, OPT_plugin_opt_thinlto_prefix_replace_eq);
-
-  std::tie(Config->ThinLTOObjectSuffixReplace.first,
-           Config->ThinLTOObjectSuffixReplace.second) =
-      getOldNewOptions(Args, OPT_plugin_opt_thinlto_object_suffix_replace_eq);
-
+  // Parse LTO options.
   if (auto *Arg = Args.getLastArg(OPT_plugin_opt_mcpu_eq))
     parseClangOption(Saver.save("-mcpu=" + StringRef(Arg->getValue())),
                      Arg->getSpelling());




More information about the llvm-commits mailing list