diff options
author | Nikita Popov <npopov@redhat.com> | 2024-07-05 09:20:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-05 09:20:25 +0200 |
commit | eb7ebd51ecfdbf541044761851dd2007368d710f (patch) | |
tree | 0b85b7737989fb698cf1b6e081bd05049839abe7 /llvm/tools/llvm-cov/SourceCoverageView.h | |
parent | c60b9307d003517ba8813eebc20d4a01fcbbda5c (diff) | |
download | llvm-eb7ebd51ecfdbf541044761851dd2007368d710f.zip llvm-eb7ebd51ecfdbf541044761851dd2007368d710f.tar.gz llvm-eb7ebd51ecfdbf541044761851dd2007368d710f.tar.bz2 |
[llvm-cov] Remove View member from MCDCView and BranchView (#97734)
These were never actually used, and the way they were constructed
doesn't really make sense.
Fixes https://github.com/llvm/llvm-project/issues/93798.
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageView.h')
-rw-r--r-- | llvm/tools/llvm-cov/SourceCoverageView.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/llvm/tools/llvm-cov/SourceCoverageView.h b/llvm/tools/llvm-cov/SourceCoverageView.h index d255f8c..2b1570d 100644 --- a/llvm/tools/llvm-cov/SourceCoverageView.h +++ b/llvm/tools/llvm-cov/SourceCoverageView.h @@ -70,12 +70,10 @@ struct InstantiationView { /// A view that represents one or more branch regions on a given source line. struct BranchView { SmallVector<CountedRegion, 0> Regions; - std::unique_ptr<SourceCoverageView> View; unsigned Line; - BranchView(unsigned Line, SmallVector<CountedRegion, 0> Regions, - std::unique_ptr<SourceCoverageView> View) - : Regions(std::move(Regions)), View(std::move(View)), Line(Line) {} + BranchView(unsigned Line, SmallVector<CountedRegion, 0> Regions) + : Regions(std::move(Regions)), Line(Line) {} unsigned getLine() const { return Line; } @@ -87,12 +85,10 @@ struct BranchView { /// A view that represents one or more MCDC regions on a given source line. struct MCDCView { SmallVector<MCDCRecord, 0> Records; - std::unique_ptr<SourceCoverageView> View; unsigned Line; - MCDCView(unsigned Line, SmallVector<MCDCRecord, 0> Records, - std::unique_ptr<SourceCoverageView> View) - : Records(std::move(Records)), View(std::move(View)), Line(Line) {} + MCDCView(unsigned Line, SmallVector<MCDCRecord, 0> Records) + : Records(std::move(Records)), Line(Line) {} unsigned getLine() const { return Line; } @@ -303,12 +299,10 @@ public: std::unique_ptr<SourceCoverageView> View); /// Add a branch subview to this view. - void addBranch(unsigned Line, SmallVector<CountedRegion, 0> Regions, - std::unique_ptr<SourceCoverageView> View); + void addBranch(unsigned Line, SmallVector<CountedRegion, 0> Regions); /// Add an MCDC subview to this view. - void addMCDCRecord(unsigned Line, SmallVector<MCDCRecord, 0> Records, - std::unique_ptr<SourceCoverageView> View); + void addMCDCRecord(unsigned Line, SmallVector<MCDCRecord, 0> Records); /// Print the code coverage information for a specific portion of a /// source file to the output stream. |