mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-19 18:24:00 +00:00
llvm-cov: Make debug output more consistent
This changes the debug output of the llvm-cov tool to consistently write to stderr, and moves the highlighting output closer to where it's relevant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217838 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user