aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-25 11:56:50 -0700
committerKazu Hirata <kazu@google.com>2022-06-25 11:56:50 -0700
commit3b7c3a654c9175f41ac871a937cbcae73dfb3c5d (patch)
tree21094939ea6c8b726c481d7b28eaf4ea27c64008 /llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
parentaa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d (diff)
downloadllvm-3b7c3a654c9175f41ac871a937cbcae73dfb3c5d.zip
llvm-3b7c3a654c9175f41ac871a937cbcae73dfb3c5d.tar.gz
llvm-3b7c3a654c9175f41ac871a937cbcae73dfb3c5d.tar.bz2
Revert "Don't use Optional::hasValue (NFC)"
This reverts commit aa8feeefd3ac6c78ee8f67bf033976fc7d68bc6d.
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp')
-rw-r--r--llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp b/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
index 46782c9..f38eb00 100644
--- a/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
+++ b/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp
@@ -561,12 +561,12 @@ void SourceCoverageViewHTML::renderLine(raw_ostream &OS, LineRef L,
else
Color = None;
- if (Color)
+ if (Color.hasValue())
Snippets[I + 1] = Highlight(Snippets[I + 1], CurSeg->Col,
CurSeg->Col + Snippets[I + 1].size());
}
- if (Color && Segments.empty())
+ if (Color.hasValue() && Segments.empty())
Snippets.back() = Highlight(Snippets.back(), 1, 1 + Snippets.back().size());
if (getOptions().Debug) {