[PATCH] D41206: [llvm-cov] Multi-threaded implementation of prepareFileReports method.

Max Moroz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 21 14:44:48 PST 2017


Dor1s marked an inline comment as done.
Dor1s added inline comments.


================
Comment at: tools/llvm-cov/CoverageSummaryInfo.h:181
 
+  FileCoverageSummary()
+      : Name(), RegionCoverage(), LineCoverage(), FunctionCoverage(),
----------------
Dor1s wrote:
> vsk wrote:
> > I don't think we should make it possible to create file summaries with empty names. Was this introduced so the std::vector could default-initialize FileCoverageSummary? If so, would make_unique<FileCoverageSummary[]>(N) suffice as an alternative?
> Yes :( I'm not sure how `make_unique` may help, e.g. if I do:
> 
> ```
> auto FileReports = std::make_unique<FileCoverageSummary[]>(Files.size());
> ```
> 
> It still needs a default constructor. Did you mean `llvm::make_unique` by any chance? It still looks for an empty constructor though
Either way, I found another solution. Let me upload it real quick so you can take a look :)


https://reviews.llvm.org/D41206





More information about the llvm-commits mailing list