[lld] 87e6251 - [ELF] Use --error-limit instead of -error-limit

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 27 12:47:42 PST 2022


Author: Fangrui Song
Date: 2022-02-27T20:47:37Z
New Revision: 87e6251d66995072a623e85e8cb601d4ced5cb7c

URL: https://github.com/llvm/llvm-project/commit/87e6251d66995072a623e85e8cb601d4ced5cb7c
DIFF: https://github.com/llvm/llvm-project/commit/87e6251d66995072a623e85e8cb601d4ced5cb7c.diff

LOG: [ELF] Use --error-limit instead of -error-limit

Added: 
    

Modified: 
    lld/ELF/Driver.cpp
    lld/test/ELF/error-limit-no-newlines.s
    lld/test/ELF/error-limit.test

Removed: 
    


################################################################################
diff  --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 3f767b5df9464..d65785e7f5c41 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -114,7 +114,7 @@ bool elf::link(ArrayRef<const char *> args, llvm::raw_ostream &stdoutOS,
   };
   ctx->e.logName = args::getFilenameWithoutExe(args[0]);
   ctx->e.errorLimitExceededMsg = "too many errors emitted, stopping now (use "
-                                 "-error-limit=0 to see all errors)";
+                                 "--error-limit=0 to see all errors)";
 
   config = std::make_unique<Configuration>();
   driver = std::make_unique<LinkerDriver>();

diff  --git a/lld/test/ELF/error-limit-no-newlines.s b/lld/test/ELF/error-limit-no-newlines.s
index f2468b40007f2..f628be2c769a1 100644
--- a/lld/test/ELF/error-limit-no-newlines.s
+++ b/lld/test/ELF/error-limit-no-newlines.s
@@ -8,7 +8,7 @@
 # CHECK-NEXT: >>> defined at {{.*}}1.o:(.text+0x0)
 # CHECK-NEXT: >>> defined at {{.*}}1.o:(.text+0x0)
 # CHECK-EMPTY:
-# CHECK-NEXT: ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
+# CHECK-NEXT: ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
 ## Ensure that there isn't an additional newline before the next message:
 # CHECK-NEXT: END
 .globl _start

diff  --git a/lld/test/ELF/error-limit.test b/lld/test/ELF/error-limit.test
index a82f2f2bfd729..dc197c2f8b063 100644
--- a/lld/test/ELF/error-limit.test
+++ b/lld/test/ELF/error-limit.test
@@ -3,24 +3,24 @@ RUN:   21 22 2>&1 | FileCheck -check-prefix=DEFAULT %s
 
 DEFAULT:      cannot open 01
 DEFAULT:      cannot open 20
-DEFAULT-NEXT: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
+DEFAULT-NEXT: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
 DEFAULT-NOT:  cannot open 21
 
-RUN: not ld.lld -error-limit=5 01 02 03 04 05 06 07 08 09 10 2>&1 \
+RUN: not ld.lld --error-limit=5 01 02 03 04 05 06 07 08 09 10 2>&1 \
 RUN:   | FileCheck -check-prefix=LIMIT5 %s
-RUN: not ld.lld -error-limit 5 01 02 03 04 05 06 07 08 09 10 2>&1 \
+RUN: not ld.lld --error-limit 5 01 02 03 04 05 06 07 08 09 10 2>&1 \
 RUN:   | FileCheck -check-prefix=LIMIT5 %s
 
 LIMIT5:      cannot open 01
 LIMIT5:      cannot open 05
-LIMIT5-NEXT: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
+LIMIT5-NEXT: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
 LIMIT5-NOT:  cannot open 06
 
-RUN: not ld.lld -error-limit=0 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 \
+RUN: not ld.lld --error-limit=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:     cannot open 01
 UNLIMITED:     cannot open 20
 UNLIMITED:     cannot open 21
 UNLIMITED:     cannot open 22
-UNLIMITED-NOT: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
+UNLIMITED-NOT: too many errors emitted, stopping now (use --error-limit=0 to see all errors)


        


More information about the llvm-commits mailing list