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

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 3 09:52:08 PDT 2016


vsk added a comment.

There shouldn't be a need to check in a binary profdata file.


================
Comment at: test/tools/llvm-cov/cov_dir.cpp:1
@@ +1,2 @@
+// RUN: llvm-cov report %S/Inputs/cov_dir_test -instr-profile %S/Inputs/cov_dir.profdata %S/Inputs/cov_dir/ 2>&1 | FileCheck %s
+
----------------
Instead of checking in an executable, use `llvm-cov convert-for-testing cov_dir_test -o cov_dir.covmapping` and check in the covmapping.

================
Comment at: tools/llvm-cov/CodeCoverage.cpp:73
@@ -72,1 +72,3 @@
 
+  /// \brief Collects all source files recursively inside the directory
+  void collectSourceFiles(StringRef Path);
----------------
nit, Please add a period.

================
Comment at: tools/llvm-cov/CodeCoverage.cpp:258
@@ +257,3 @@
+  }
+  SourceFiles.push_back(Path.str());
+  return;
----------------
You aren't checking whether this is a regular file, or if it exists. Could you extend the patch in your penultimate comment with extra error checking and report back on the exact failures you're seeing?


http://reviews.llvm.org/D20803





More information about the llvm-commits mailing list