From 60a3da3f4c69a5d5082dbafcecf3f0ddec8bafe5 Mon Sep 17 00:00:00 2001 From: Ying Yi Date: Fri, 22 Jul 2016 10:52:21 +0000 Subject: [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 --- llvm/lib/Support/CommandLine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Support/CommandLine.cpp') diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index 05a7db5cfb3..3b1b3eb7e55 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -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; -- cgit v1.2.3