[lld] r287454 - Simplify "missing argument" error message.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 19 10:49:39 PST 2016
Author: ruiu
Date: Sat Nov 19 12:49:38 2016
New Revision: 287454
URL: http://llvm.org/viewvc/llvm-project?rev=287454&view=rev
Log:
Simplify "missing argument" error message.
We do not have an option taking more than one arguments,
so we can just say "missing argument" instead of "missing argument(s)".
Modified:
lld/trunk/ELF/DriverUtils.cpp
lld/trunk/test/ELF/basic.s
lld/trunk/test/ELF/libsearch.s
Modified: lld/trunk/ELF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/DriverUtils.cpp?rev=287454&r1=287453&r2=287454&view=diff
==============================================================================
--- lld/trunk/ELF/DriverUtils.cpp (original)
+++ lld/trunk/ELF/DriverUtils.cpp Sat Nov 19 12:49:38 2016
@@ -81,9 +81,7 @@ opt::InputArgList ELFOptTable::parse(Arr
// Parse options and then do error checking.
Args = this->ParseArgs(Vec, MissingIndex, MissingCount);
if (MissingCount)
- error(Twine("missing arg value for \"") + Args.getArgString(MissingIndex) +
- "\", expected " + Twine(MissingCount) +
- (MissingCount == 1 ? " argument.\n" : " arguments"));
+ error(Twine(Args.getArgString(MissingIndex)) + ": missing argument");
for (auto *Arg : Args.filtered(OPT_UNKNOWN))
error("unknown argument: " + Arg->getSpelling());
Modified: lld/trunk/test/ELF/basic.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/basic.s?rev=287454&r1=287453&r2=287454&view=diff
==============================================================================
--- lld/trunk/test/ELF/basic.s (original)
+++ lld/trunk/test/ELF/basic.s Sat Nov 19 12:49:38 2016
@@ -230,7 +230,7 @@ _start:
# CANNOT_OPEN: cannot open {{.*}}.no.such.file: {{[Nn]}}o such file or directory
# RUN: not ld.lld %t -o 2>&1 | FileCheck --check-prefix=NO_O_VAL %s
-# NO_O_VAL: missing arg value for "-o", expected 1 argument.
+# NO_O_VAL: -o: missing argument
# RUN: not ld.lld --foo 2>&1 | FileCheck --check-prefix=UNKNOWN %s
# UNKNOWN: unknown argument: --foo
Modified: lld/trunk/test/ELF/libsearch.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/libsearch.s?rev=287454&r1=287453&r2=287454&view=diff
==============================================================================
--- lld/trunk/test/ELF/libsearch.s (original)
+++ lld/trunk/test/ELF/libsearch.s Sat Nov 19 12:49:38 2016
@@ -15,7 +15,7 @@
// Should fail if no library specified
// RUN: not ld.lld -l 2>&1 \
// RUN: | FileCheck --check-prefix=NOLIBRARY %s
-// NOLIBRARY: missing arg value for "-l", expected 1 argument.
+// NOLIBRARY: -l: missing argument
// Should link normally, because _bar is not used
// RUN: ld.lld -o %t3 %t.o
More information about the llvm-commits
mailing list