[llvm-cov] Highlight gaps in consecutive uncovered regions

llvm-cov typically doesn't highlight gap segments, but it should if the
gap occurs after an uncovered region in order to preserve continuity.

llvm-svn: 316107
diff --git a/llvm/tools/llvm-cov/SourceCoverageViewText.cpp b/llvm/tools/llvm-cov/SourceCoverageViewText.cpp
index e4ac1fd..6990ed0 100644
--- a/llvm/tools/llvm-cov/SourceCoverageViewText.cpp
+++ b/llvm/tools/llvm-cov/SourceCoverageViewText.cpp
@@ -121,7 +121,8 @@
     Col = End;
     if (Col == ExpansionCol)
       Highlight = raw_ostream::CYAN;
-    else if (!S->IsGapRegion && S->HasCount && S->Count == 0)
+    else if ((!S->IsGapRegion || Highlight == raw_ostream::RED) &&
+             S->HasCount && S->Count == 0)
       Highlight = raw_ostream::RED;
     else
       Highlight = None;