[PATCH] D151283: [llvm-cov] Support a Hierarchical Structure for HTML Coverage Report Generating
Yuhao Gu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 10 05:17:51 PDT 2023
AtomicGu marked 2 inline comments as done.
AtomicGu added inline comments.
================
Comment at: llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp:519-525
+ // Emit the default stylesheet.
+ auto CSSOrErr = createOutputStream("style", "css", /*InToplevel=*/true);
+ if (Error E = CSSOrErr.takeError())
+ return E;
+
+ OwnedStream CSS = std::move(CSSOrErr.get());
+ CSS->operator<<(CSSForCoverage);
----------------
phosek wrote:
> This code is duplicated between `CoveragePrinterHTML::createIndexFile` and `CoveragePrinterHTMLDirectory::createIndexFile`, could it be extracted into a helper function?
This can be extracted to a helper method of CoveragePrinterHTML.
Personally, I tolerate code repetition for modification flexibility if it's not more than twrice. If it is not welcomed in LLVM community, I will fix it.
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