[llvm-cov] - Improve llvm-cov error message

Summary:

When giving the following command:
% llvm-cov report -instr-profile=default.profraw

llvm-cov will give the following error message:

>llvm-cov report: Not enough positional command line arguments specified!
>Must specify at least 1 positional arguments: See: orbis-llvm-cov report -help

This patch changes the error message from  '1 positional arguments'
to '1 positional argument'.

Differential Revision: https://reviews.llvm.org/D22621

llvm-svn: 276404
This commit is contained in:
Ying Yi 2016-07-22 10:52:21 +00:00
parent 0576ad6d35
commit 60a3da3f4c
2 changed files with 5 additions and 1 deletions

View File

@ -1211,7 +1211,8 @@ bool CommandLineParser::ParseCommandLineOptions(int argc,
errs() << ProgramName
<< ": Not enough positional command line arguments specified!\n"
<< "Must specify at least " << NumPositionalRequired
<< " positional arguments: See: " << argv[0] << " -help\n";
<< " positional argument" << (NumPositionalRequired > 1 ? "s" : "")
<< ": See: " << argv[0] << " - help\n";
}
ErrorParsing = true;

View File

@ -8,3 +8,6 @@ int main(int argc, const char *argv[]) {}
// RUN: not llvm-cov show %S/Inputs/universal-binary -instr-profile %t.profdata -filename-equivalence %s -arch i386 2>&1 | FileCheck --check-prefix=WRONG-ARCH %s
// WRONG-ARCH: Failed to load coverage
// RUN: not llvm-cov report -instr-profile %t.profdata 2>&1 | FileCheck --check-prefix=MISSING-BINARY %s
// MISSING-BINARY: 1 positional argument: See: