[PATCH] D20803: Displaying coverage information for all source files present in a directory

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 20 10:53:10 PDT 2016


vsk added a comment.

In https://reviews.llvm.org/D20803#489656, @chakshugrover wrote:

> I skip the recursive directory traversal if -filename-equivalence is turned on as I believe that option is meant for a completely different purpose ( Treat source files (not directories) as equivalent to paths in the coverage data even when only the file names match )


I disagree. It should retain its original meaning while applying to all files within the directory.


================
Comment at: test/tools/llvm-cov/cov_dir.cpp:6
@@ +5,3 @@
+//RUN: llvm-cov show /dev/null -instr-profile=/dev/null -dump-input-file-list %t | FileCheck %s
+//CHECK-DAG: {{.*}}c.tmp
+//CHECK-DAG: {{.*}}d.tmp
----------------
chakshugrover wrote:
> As the code is being tested already in multiple test cases such as report.cpp with -filename-equivalence turned on, I think writing another RUN line to check the same may be redundant.  
I pointed this out in a comment further below, but: I think there is a bug in your patch which occurs when you turn on -filename-equivalence with recursive directory search. So, in this case, I don't think the extra test I suggested is redundant.

================
Comment at: tools/llvm-cov/CodeCoverage.cpp:96
@@ -92,2 +95,3 @@
   std::string CoverageArch;
+  bool DumpFileNames;
 
----------------
Instead of adding this to CodeCoverageTool, you can simply call exit(0) after you're finished printing the input file list in the command line arg parser.


https://reviews.llvm.org/D20803





More information about the llvm-commits mailing list