[PATCH] D87003: [llvm-cov] Allow commas in filenames passed to `-object` flag
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 18 13:46:43 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3c731ba5f1b6: [llvm-cov] Allow commas in filenames passed to `-object` flag (authored by vsk).
Changed prior to commit:
https://reviews.llvm.org/D87003?vs=291779&id=292893#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87003/new/
https://reviews.llvm.org/D87003
Files:
llvm/test/tools/llvm-cov/comma-in-coverage-object-filename.test
llvm/tools/llvm-cov/CodeCoverage.cpp
Index: llvm/tools/llvm-cov/CodeCoverage.cpp
===================================================================
--- llvm/tools/llvm-cov/CodeCoverage.cpp
+++ llvm/tools/llvm-cov/CodeCoverage.cpp
@@ -544,8 +544,11 @@
cl::Positional, cl::desc("Covered executable or object file."));
cl::list<std::string> CovFilenames(
- "object", cl::desc("Coverage executable or object file"), cl::ZeroOrMore,
- cl::CommaSeparated);
+ "object", cl::desc("Coverage executable or object file"), cl::ZeroOrMore);
+
+ cl::opt<bool> DebugDumpCollectedObjects(
+ "dump-collected-objects", cl::Optional, cl::Hidden,
+ cl::desc("Show the collected coverage object files"));
cl::list<std::string> InputSourceFiles(
cl::Positional, cl::desc("<Source files>"), cl::ZeroOrMore);
@@ -668,6 +671,12 @@
::exit(1);
}
+ if (DebugDumpCollectedObjects) {
+ for (StringRef OF : ObjectFilenames)
+ outs() << OF << '\n';
+ ::exit(0);
+ }
+
ViewOpts.Format = Format;
switch (ViewOpts.Format) {
case CoverageViewOptions::OutputFormat::Text:
Index: llvm/test/tools/llvm-cov/comma-in-coverage-object-filename.test
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-cov/comma-in-coverage-object-filename.test
@@ -0,0 +1,3 @@
+RUN: llvm-cov show %t -instr-profile %t -dump-collected-objects -object a,b | FileCheck %s
+
+CHECK: a,b
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87003.292893.patch
Type: text/x-patch
Size: 1444 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200918/4d4c0340/attachment.bin>
More information about the llvm-commits
mailing list