<html>
    <head>
      <base href="http://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:vsk@apple.com" title="Vedant Kumar <vsk@apple.com>"> <span class="fn">Vedant Kumar</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - llvm-cov show -format html: index says 0/0 lines covered for a source file with some non-0 line counts"
   href="http://bugs.llvm.org/show_bug.cgi?id=31980">bug 31980</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>WONTFIX
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>vsk@apple.com
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - llvm-cov show -format html: index says 0/0 lines covered for a source file with some non-0 line counts"
   href="http://bugs.llvm.org/show_bug.cgi?id=31980#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - llvm-cov show -format html: index says 0/0 lines covered for a source file with some non-0 line counts"
   href="http://bugs.llvm.org/show_bug.cgi?id=31980">bug 31980</a>
              from <span class="vcard"><a class="email" href="mailto:vsk@apple.com" title="Vedant Kumar <vsk@apple.com>"> <span class="fn">Vedant Kumar</span></a>
</span></b>
        <pre>llvm-cov attributes the coverage for each function to a single file. We'd need
to break this policy to report additional coverage for cov.h, resulting in
double-counting in the coverage totals.

If you don't mind the double-counting, here's a patch you can use to see
additional statistics for cov.h:

diff --git a/lib/ProfileData/Coverage/CoverageMapping.cpp
b/lib/ProfileData/Coverage/CoverageMapping.cpp
index 6d907c7098e..d28b8b153a3 100644
--- a/lib/ProfileData/Coverage/CoverageMapping.cpp
+++ b/lib/ProfileData/Coverage/CoverageMapping.cpp
@@ -176,8 +176,13 @@ Expected<int64_t> CounterMappingContext::evaluate(const
Counter &C) const {
 }

 void FunctionRecordIterator::skipOtherFiles() {
+  auto ContainsFilename = [this](const FunctionRecord &FR) {
+    return std::find(FR.Filenames.begin(), FR.Filenames.end(), Filename) !=
+           FR.Filenames.end();
+  };
+
   while (Current != Records.end() && !Filename.empty() &&
-         Filename != Current->Filenames[0])
+         !ContainsFilename(*Current))
     ++Current;
   if (Current == Records.end())
     *this = FunctionRecordIterator();</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>