mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-10-09 20:34:54 +00:00
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)". llvm-svn: 287454
This commit is contained in:
parent
fec2158292
commit
844c1c908c
@ -81,9 +81,7 @@ opt::InputArgList ELFOptTable::parse(ArrayRef<const char *> Argv) {
|
||||
// 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());
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user