summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-cov')
-rw-r--r--llvm/tools/llvm-cov/CodeCoverage.cpp8
-rw-r--r--llvm/tools/llvm-cov/SourceCoverageView.cpp24
2 files changed, 16 insertions, 16 deletions
diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp
index 79a596d702a..f3587c768de 100644
--- a/llvm/tools/llvm-cov/CodeCoverage.cpp
+++ b/llvm/tools/llvm-cov/CodeCoverage.cpp
@@ -273,7 +273,7 @@ void CodeCoverageTool::createExpansionSubView(
auto ExpandedLines = findExpandedFileInterestingLineRange(
ExpandedRegion.ExpandedFileID, Function);
if (ViewOpts.Debug)
- llvm::outs() << "Expansion of " << ExpandedRegion.ExpandedFileID << ":"
+ llvm::errs() << "Expansion of " << ExpandedRegion.ExpandedFileID << ":"
<< ExpandedLines.first << " -> " << ExpandedLines.second
<< " @ " << ExpandedRegion.FileID << ", "
<< ExpandedRegion.LineStart << ":"
@@ -397,14 +397,14 @@ bool CodeCoverageTool::load() {
for (const auto &R : I.MappingRegions) {
// Compute the values of mapped regions
if (ViewOpts.Debug) {
- outs() << "File " << R.FileID << "| " << R.LineStart << ":"
+ errs() << "File " << R.FileID << "| " << R.LineStart << ":"
<< R.ColumnStart << " -> " << R.LineEnd << ":" << R.ColumnEnd
<< " = ";
Ctx.dump(R.Count);
if (R.Kind == CounterMappingRegion::ExpansionRegion) {
- outs() << " (Expanded file id = " << R.ExpandedFileID << ") ";
+ errs() << " (Expanded file id = " << R.ExpandedFileID << ") ";
}
- outs() << "\n";
+ errs() << "\n";
}
ErrorOr<int64_t> ExecutionCount = Ctx.evaluate(R.Count);
if (ExecutionCount) {
diff --git a/llvm/tools/llvm-cov/SourceCoverageView.cpp b/llvm/tools/llvm-cov/SourceCoverageView.cpp
index 7c6d9a5c0f3..202475a7562 100644
--- a/llvm/tools/llvm-cov/SourceCoverageView.cpp
+++ b/llvm/tools/llvm-cov/SourceCoverageView.cpp
@@ -49,6 +49,18 @@ void SourceCoverageView::renderLine(raw_ostream &OS, StringRef Line,
// Show the rest of the line
OS << Line.substr(Start - 1, Line.size() - Start + 1);
OS << "\n";
+
+ if (Options.Debug) {
+ for (const auto &Range : Ranges) {
+ errs() << "Highlighted line " << Range.Line << ", " << Range.ColumnStart
+ << " -> ";
+ if (Range.ColumnEnd == std::numeric_limits<unsigned>::max()) {
+ errs() << "?\n";
+ } else {
+ errs() << Range.ColumnEnd << "\n";
+ }
+ }
+ }
}
void SourceCoverageView::renderOffset(raw_ostream &OS, unsigned I) {
@@ -390,18 +402,6 @@ SourceCoverageView::createHighlightRanges(SourceCoverageDataManager &Data) {
}
std::sort(HighlightRanges.begin(), HighlightRanges.end());
-
- if (Options.Debug) {
- for (const auto &Range : HighlightRanges) {
- outs() << "Highlighted line " << Range.Line << ", " << Range.ColumnStart
- << " -> ";
- if (Range.ColumnEnd == std::numeric_limits<unsigned>::max()) {
- outs() << "?\n";
- } else {
- outs() << Range.ColumnEnd << "\n";
- }
- }
- }
}
void SourceCoverageView::createRegionMarkers(SourceCoverageDataManager &Data) {
OpenPOWER on IntegriCloud