[lld] r327261 - Make lld-link shout at me less.

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 12 05:45:41 PDT 2018


Author: nico
Date: Mon Mar 12 05:45:40 2018
New Revision: 327261

URL: http://llvm.org/viewvc/llvm-project?rev=327261&view=rev
Log:
Make lld-link shout at me less.

This makes the output of some flag names in warning messages consistent with
the output of /? and the output of flags in most other diagnostics.

https://reviews.llvm.org/D44307

Modified:
    lld/trunk/COFF/Driver.cpp
    lld/trunk/COFF/DriverUtils.cpp
    lld/trunk/test/COFF/error-limit.test
    lld/trunk/test/COFF/incremental.test

Modified: lld/trunk/COFF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=327261&r1=327260&r2=327261&view=diff
==============================================================================
--- lld/trunk/COFF/Driver.cpp (original)
+++ lld/trunk/COFF/Driver.cpp Mon Mar 12 05:45:40 2018
@@ -61,7 +61,7 @@ bool link(ArrayRef<const char *> Args, b
   errorHandler().ColorDiagnostics = Diag.has_colors();
   errorHandler().ErrorLimitExceededMsg =
       "too many errors emitted, stopping now"
-      " (use /ERRORLIMIT:0 to see all errors)";
+      " (use /errorlimit:0 to see all errors)";
   errorHandler().ExitEarly = CanExitEarly;
   Config = make<Configuration>();
   Config->Argv = {Args.begin(), Args.end()};
@@ -1128,7 +1128,7 @@ void LinkerDriver::link(ArrayRef<const c
 
   if (!Config->ManifestInput.empty() &&
       Config->Manifest != Configuration::Embed) {
-    fatal("/MANIFESTINPUT: requires /MANIFEST:EMBED");
+    fatal("/manifestinput: requires /manifest:embed");
   }
 
   // Handle miscellaneous boolean flags.
@@ -1146,13 +1146,13 @@ void LinkerDriver::link(ArrayRef<const c
   Config->MapFile = getMapFile(Args);
 
   if (Config->Incremental && Config->DoGC) {
-    warn("ignoring '/INCREMENTAL' because REF is enabled; use '/OPT:NOREF' to "
+    warn("ignoring '/incremental' because REF is enabled; use '/opt:noref' to "
          "disable");
     Config->Incremental = false;
   }
 
   if (Config->Incremental && Config->DoICF) {
-    warn("ignoring '/INCREMENTAL' because ICF is enabled; use '/OPT:NOICF' to "
+    warn("ignoring '/incremental' because ICF is enabled; use '/opt:noicf' to "
          "disable");
     Config->Incremental = false;
   }

Modified: lld/trunk/COFF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/DriverUtils.cpp?rev=327261&r1=327260&r2=327261&view=diff
==============================================================================
--- lld/trunk/COFF/DriverUtils.cpp (original)
+++ lld/trunk/COFF/DriverUtils.cpp Mon Mar 12 05:45:40 2018
@@ -139,7 +139,7 @@ void parseGuard(StringRef FullArg) {
     else if (Arg.equals_lower("cf") || Arg.equals_lower("longjmp"))
       Config->GuardCF = GuardCFLevel::Full;
     else
-      fatal("invalid argument to /GUARD: " + Arg);
+      fatal("invalid argument to /guard: " + Arg);
   }
 }
 

Modified: lld/trunk/test/COFF/error-limit.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/error-limit.test?rev=327261&r1=327260&r2=327261&view=diff
==============================================================================
--- lld/trunk/test/COFF/error-limit.test (original)
+++ lld/trunk/test/COFF/error-limit.test Mon Mar 12 05:45:40 2018
@@ -3,27 +3,27 @@ RUN:   21 22 2>&1 | FileCheck -check-pre
 
 DEFAULT:      could not open 01
 DEFAULT:      could not open 20
-DEFAULT-NEXT: too many errors emitted, stopping now (use /ERRORLIMIT:0 to see all errors)
+DEFAULT-NEXT: too many errors emitted, stopping now (use /errorlimit:0 to see all errors)
 DEFAULT-NOT:  could not open 21
 
-RUN: not lld-link /ERRORLIMIT:5 01 02 03 04 05 06 07 08 09 10 2>&1 \
+RUN: not lld-link /errorlimit:5 01 02 03 04 05 06 07 08 09 10 2>&1 \
 RUN:   | FileCheck -check-prefix=LIMIT5 %s
 
 LIMIT5:      could not open 01
 LIMIT5:      could not open 05
-LIMIT5-NEXT: too many errors emitted, stopping now (use /ERRORLIMIT:0 to see all errors)
+LIMIT5-NEXT: too many errors emitted, stopping now (use /errorlimit:0 to see all errors)
 LIMIT5-NOT:  could not open 06
 
-RUN: not lld-link /ERRORLIMIT:0 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 \
+RUN: not lld-link /errorlimit:0 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 \
 RUN:   16 17 18 19 20 21 22 2>&1 | FileCheck -check-prefix=UNLIMITED %s
 
 UNLIMITED:     could not open 01
 UNLIMITED:     could not open 20
 UNLIMITED:     could not open 21
 UNLIMITED:     could not open 22
-UNLIMITED-NOT: too many errors emitted, stopping now (use /ERRORLIMIT:0 to see all errors)
+UNLIMITED-NOT: too many errors emitted, stopping now (use /errorlimit:0 to see all errors)
 
-RUN: not lld-link /ERRORLIMIT:XYZ 01 02 03 04 05 06 07 08 09 10 11 12 13 14 \
+RUN: not lld-link /errorlimit:XYZ 01 02 03 04 05 06 07 08 09 10 11 12 13 14 \
 RUN:   15 16 17 18 19 20 21 22 2>&1 | FileCheck -check-prefix=WRONG %s
 
-WRONG:      /ERRORLIMIT: number expected, but got XYZ
+WRONG:      /errorlimit: number expected, but got XYZ

Modified: lld/trunk/test/COFF/incremental.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/incremental.test?rev=327261&r1=327260&r2=327261&view=diff
==============================================================================
--- lld/trunk/test/COFF/incremental.test (original)
+++ lld/trunk/test/COFF/incremental.test Mon Mar 12 05:45:40 2018
@@ -59,8 +59,8 @@
 # RUN: lld-link -out:%t.dll -dll -debug -opt:ref %t.obj
 # RUN: ls -l %t.lib | FileCheck -check-prefix=NOKEEP %s
 
-# NOWARN-NOT: ignoring '/INCREMENTAL'
-# WARN-ICF: ignoring '/INCREMENTAL' because ICF is enabled; use '/OPT:NOICF' to disable
-# WARN-REF: ignoring '/INCREMENTAL' because REF is enabled; use '/OPT:NOREF' to disable
+# NOWARN-NOT: ignoring '/incremental'
+# WARN-ICF: ignoring '/incremental' because ICF is enabled; use '/opt:noicf' to disable
+# WARN-REF: ignoring '/incremental' because REF is enabled; use '/opt:noref' to disable
 # KEEP: {{Feb 1 1980|1980-02-01}}
 # NOKEEP-NOT: {{Feb 1 1980|1980-02-01}}




More information about the llvm-commits mailing list