summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov/CodeCoverage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-cov/CodeCoverage.cpp')
-rw-r--r--llvm/tools/llvm-cov/CodeCoverage.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp
index 3945b17bc3d..79a596d702a 100644
--- a/llvm/tools/llvm-cov/CodeCoverage.cpp
+++ b/llvm/tools/llvm-cov/CodeCoverage.cpp
@@ -283,8 +283,7 @@ void CodeCoverageTool::createExpansionSubView(
if (!SourceBuffer)
return;
auto SubView = llvm::make_unique<SourceCoverageView>(
- SourceBuffer.get(), Parent.getOptions(), ExpandedLines.first,
- ExpandedLines.second, ExpandedRegion);
+ SourceBuffer.get(), Parent.getOptions(), ExpandedRegion);
SourceCoverageDataManager RegionManager;
for (const auto &CR : Function.CountedRegions) {
if (CR.FileID == ExpandedRegion.ExpandedFileID)
@@ -362,13 +361,9 @@ bool CodeCoverageTool::createSourceFileView(
for (const auto &InstantiationSet : InstantiationSetCollector) {
if (InstantiationSet.second.size() < 2)
continue;
- auto InterestingRange = findExpandedFileInterestingLineRange(
- InstantiationSet.second.front()->CountedRegions.front().FileID,
- *InstantiationSet.second.front());
for (auto Function : InstantiationSet.second) {
- auto SubView = llvm::make_unique<SourceCoverageView>(
- View, InterestingRange.first, InterestingRange.second,
- Function->Name);
+ auto SubView =
+ llvm::make_unique<SourceCoverageView>(View, Function->Name);
createInstantiationSubView(SourceFile, *Function, *SubView);
View.addChild(std::move(SubView));
}
@@ -618,9 +613,7 @@ int CodeCoverageTool::show(int argc, const char **argv,
auto SourceBuffer = getSourceFile(SourceFile);
if (!SourceBuffer)
return 1;
- auto Range = findExpandedFileInterestingLineRange(MainFileID, Function);
- SourceCoverageView mainView(SourceBuffer.get(), ViewOpts, Range.first,
- Range.second);
+ SourceCoverageView mainView(SourceBuffer.get(), ViewOpts);
createSourceFileView(SourceFile, mainView, Function, true);
ViewOpts.colored_ostream(outs(), raw_ostream::CYAN)
<< Function.Name << " from " << SourceFile << ":";
OpenPOWER on IntegriCloud