1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

[llvm-cov] Make an API more consistent, NFC

Make renderExpansionView() look a bit more like renderLine(), and
clarify its doxygen comment.

llvm-svn: 273773
This commit is contained in:
Vedant Kumar 2016-06-25 05:48:59 +00:00
parent 1579f6c57d
commit 3d4d8ef75b
4 changed files with 14 additions and 12 deletions

View File

@ -133,7 +133,7 @@ void SourceCoverageView::print(raw_ostream &OS, bool WholeFile,
OS, *NextESV,
RenderedSubView ? Optional<LineRef>({*LI, LI.line_number()})
: Optional<LineRef>(),
ExpansionColumn, WrappedSegment, LineSegments, ViewDepth);
WrappedSegment, LineSegments, ExpansionColumn, ViewDepth);
RenderedSubView = true;
}
for (; NextISV != EndISV && NextISV->Line == LI.line_number(); ++NextISV) {

View File

@ -163,12 +163,14 @@ protected:
CoverageSegmentArray Segments,
unsigned ViewDepth) = 0;
/// \brief Render an expansion view. If \p FirstLine is provided, it points
/// to the expansion site, which must be re-rendered for clarity.
virtual unsigned renderExpansionView(
raw_ostream &OS, ExpansionView &ESV, Optional<LineRef> FirstLine,
unsigned ExpansionCol, const coverage::CoverageSegment *WrappedSegment,
CoverageSegmentArray LineSegments, unsigned ViewDepth) = 0;
/// \brief Render an expansion view. If the expansion site must be re-rendered
/// for clarity, it is passed in via \p FirstLine.
virtual unsigned
renderExpansionView(raw_ostream &OS, ExpansionView &ESV,
Optional<LineRef> FirstLine,
const coverage::CoverageSegment *WrappedSegment,
CoverageSegmentArray Segments, unsigned ExpansionCol,
unsigned ViewDepth) = 0;
/// \brief Render an instantiation view.
virtual void renderInstantiationView(raw_ostream &OS, InstantiationView &ISV,

View File

@ -158,8 +158,8 @@ void SourceCoverageViewText::renderRegionMarkers(
unsigned SourceCoverageViewText::renderExpansionView(
raw_ostream &OS, ExpansionView &ESV, Optional<LineRef> FirstLine,
unsigned ExpansionCol, const coverage::CoverageSegment *WrappedSegment,
CoverageSegmentArray LineSegments, unsigned ViewDepth) {
const coverage::CoverageSegment *WrappedSegment,
CoverageSegmentArray Segments, unsigned ExpansionCol, unsigned ViewDepth) {
unsigned NextExpansionCol = ExpansionCol;
if (FirstLine.hasValue()) {
@ -168,7 +168,7 @@ unsigned SourceCoverageViewText::renderExpansionView(
NextExpansionCol = ESV.getStartCol();
renderLinePrefix(OS, ViewDepth);
OS.indent(getCombinedColumnWidth(getOptions()) + (ViewDepth == 0 ? 0 : 1));
renderLine(OS, *FirstLine, WrappedSegment, LineSegments, ExpansionCol,
renderLine(OS, *FirstLine, WrappedSegment, Segments, ExpansionCol,
ViewDepth);
renderViewDivider(OS, ViewDepth + 1);
}

View File

@ -33,9 +33,9 @@ class SourceCoverageViewText : public SourceCoverageView {
unsigned renderExpansionView(raw_ostream &OS, ExpansionView &ESV,
Optional<LineRef> FirstLine,
unsigned ExpansionCol,
const coverage::CoverageSegment *WrappedSegment,
CoverageSegmentArray LineSegments,
CoverageSegmentArray Segments,
unsigned ExpansionCol,
unsigned ViewDepth) override;
void renderInstantiationView(raw_ostream &OS, InstantiationView &ISV,