[PATCH] D151283: [WIP][llvm-cov] Support a Hierarchical Structure for `show --format=html` (WORK IN PROGRESS)

Yuhao Gu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 20:38:22 PDT 2023


AtomicGu marked 2 inline comments as done.
AtomicGu added inline comments.


================
Comment at: llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp:503
+    if (DirLCP.size() == 0) {
+      Files.push_back(DirLCP.str());
+      continue; // In this case, only one file in that directory.
----------------
AtomicGu wrote:
> gulfem wrote:
> > When the directory contains a single file, it is added to `Files`, but all the `FileReports` for `Files` are previously generated at line 494. So, there won't be any report generated for a single file in a directory. 
> > 
> Thank you! You are right, this is a mistake. I was too careless. I will solve this in the next commit.
The problem has been fixed in the new implementation.


================
Comment at: llvm/tools/llvm-cov/SourceCoverageViewHTML.h:47
+
+  Error createHierarchicalIndexFile(StringRef LCP, // Longest Common Prefix
+                                    ArrayRef<std::string> SourceFiles,
----------------
gulfem wrote:
> `createTopLevelIndexFile` might be a better name.
This function is to create index file in each subdirectory recursivly. I'm not sure the name "TopLevel" is more proper?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151283/new/

https://reviews.llvm.org/D151283



More information about the llvm-commits mailing list