[lld] r324684 - Remove Config->Verbose because we have errorHandler().Verbose.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 8 15:52:09 PST 2018


Author: ruiu
Date: Thu Feb  8 15:52:09 2018
New Revision: 324684

URL: http://llvm.org/viewvc/llvm-project?rev=324684&view=rev
Log:
Remove Config->Verbose because we have errorHandler().Verbose.

Modified:
    lld/trunk/ELF/AArch64ErrataFix.cpp
    lld/trunk/ELF/Config.h
    lld/trunk/ELF/Driver.cpp
    lld/trunk/ELF/ICF.cpp

Modified: lld/trunk/ELF/AArch64ErrataFix.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/AArch64ErrataFix.cpp?rev=324684&r1=324683&r2=324684&view=diff
==============================================================================
--- lld/trunk/ELF/AArch64ErrataFix.cpp (original)
+++ lld/trunk/ELF/AArch64ErrataFix.cpp Thu Feb  8 15:52:09 2018
@@ -555,7 +555,8 @@ static void implementPatch(uint64_t Adrp
   if (RelIt != IS->Relocations.end() && RelIt->Type == R_AARCH64_JUMP26)
     return;
 
-  if (Config->Verbose)
+
+  if (errorHandler().Verbose)
     message("detected cortex-a53-843419 erratum sequence starting at " +
             utohexstr(AdrpAddr) + " in unpatched output.");
 

Modified: lld/trunk/ELF/Config.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Config.h?rev=324684&r1=324683&r2=324684&view=diff
==============================================================================
--- lld/trunk/ELF/Config.h (original)
+++ lld/trunk/ELF/Config.h Thu Feb  8 15:52:09 2018
@@ -150,7 +150,6 @@ struct Configuration {
   bool Target1Rel;
   bool Trace;
   bool UndefinedVersion;
-  bool Verbose;
   bool WarnCommon;
   bool WarnMissingEntry;
   bool WriteAddends;

Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=324684&r1=324683&r2=324684&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Thu Feb  8 15:52:09 2018
@@ -591,6 +591,10 @@ static int parseInt(StringRef S, opt::Ar
 
 // Initializes Config members by the command line options.
 void LinkerDriver::readConfigs(opt::InputArgList &Args) {
+  errorHandler().Verbose = Args.hasArg(OPT_verbose);;
+  errorHandler().FatalWarnings =
+      Args.hasFlag(OPT_fatal_warnings, OPT_no_fatal_warnings, false);
+
   Config->AllowMultipleDefinition =
       Args.hasFlag(OPT_allow_multiple_definition,
                    OPT_no_allow_multiple_definition, false) ||
@@ -615,8 +619,6 @@ void LinkerDriver::readConfigs(opt::Inpu
   Config->Entry = Args.getLastArgValue(OPT_entry);
   Config->ExportDynamic =
       Args.hasFlag(OPT_export_dynamic, OPT_no_export_dynamic, false);
-  errorHandler().FatalWarnings =
-      Args.hasFlag(OPT_fatal_warnings, OPT_no_fatal_warnings, false);
   Config->FilterList = args::getStrings(Args, OPT_filter);
   Config->Fini = Args.getLastArgValue(OPT_fini, "_fini");
   Config->FixCortexA53Errata843419 = Args.hasArg(OPT_fix_cortex_a53_843419);
@@ -674,8 +676,6 @@ void LinkerDriver::readConfigs(opt::Inpu
   Config->UndefinedVersion =
       Args.hasFlag(OPT_undefined_version, OPT_no_undefined_version, true);
   Config->UnresolvedSymbols = getUnresolvedSymbolPolicy(Args);
-  Config->Verbose = Args.hasArg(OPT_verbose);
-  errorHandler().Verbose = Config->Verbose;
   Config->WarnCommon = Args.hasFlag(OPT_warn_common, OPT_no_warn_common, false);
   Config->ZCombreloc = !hasZOption(Args, "nocombreloc");
   Config->ZExecstack = hasZOption(Args, "execstack");

Modified: lld/trunk/ELF/ICF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/ICF.cpp?rev=324684&r1=324683&r2=324684&view=diff
==============================================================================
--- lld/trunk/ELF/ICF.cpp (original)
+++ lld/trunk/ELF/ICF.cpp Thu Feb  8 15:52:09 2018
@@ -425,7 +425,7 @@ template <class ELFT> void ICF<ELFT>::ru
   log("ICF needed " + Twine(Cnt) + " iterations");
 
   auto Print = [&](const Twine &Prefix, size_t I) {
-    if (!Config->Verbose && !Config->PrintIcfSections)
+    if (!Config->PrintIcfSections && !errorHandler().Verbose)
       return;
     std::string Filename =
         Sections[I]->File ? Sections[I]->File->getName() : "<internal>";




More information about the llvm-commits mailing list