[PATCH] D22621: [llvm-cov] - Improve llvm-cov error message
Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 22 03:59:48 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL276404: [llvm-cov] - Improve llvm-cov error message (authored by yingyi).
Changed prior to commit:
https://reviews.llvm.org/D22621?vs=64851&id=65051#toc
Repository:
rL LLVM
https://reviews.llvm.org/D22621
Files:
llvm/trunk/lib/Support/CommandLine.cpp
llvm/trunk/test/tools/llvm-cov/universal-binary.c
Index: llvm/trunk/lib/Support/CommandLine.cpp
===================================================================
--- llvm/trunk/lib/Support/CommandLine.cpp
+++ llvm/trunk/lib/Support/CommandLine.cpp
@@ -1211,7 +1211,8 @@
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;
Index: llvm/trunk/test/tools/llvm-cov/universal-binary.c
===================================================================
--- llvm/trunk/test/tools/llvm-cov/universal-binary.c
+++ llvm/trunk/test/tools/llvm-cov/universal-binary.c
@@ -8,3 +8,6 @@
// 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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22621.65051.patch
Type: text/x-patch
Size: 1252 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160722/ac457022/attachment.bin>
More information about the llvm-commits
mailing list