<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/72786>72786</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            LLVM-COV - Warnings of "X functions have mismatched data" and missing coverage data in reports
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          kenkopelson
      </td>
    </tr>
</table>

<pre>
    This was reported back in 2017 (issue #[32849](https://github.com/llvm/llvm-project/issues/32849)), but apparently it is still an issue. After doing a fair amount of research, it seems this is a problem only with building SHARED libraries, which in this case is a DLL on Windows 10. I do not see this problem when building a STATIC library. I require using a DLL, however, so this is not something I can just ignore.

After the DLL builds, and runs all the tests, it shows the following messages on the console:

```
[build] =========================================================================================================================================
[build] All tests passed (116189 assertions in 27 test cases)
[build] 
[build] warning: 55 functions have mismatched data
[build] warning: 55 functions have mismatched data
[build] [59/59  98% :: 12.421] Install the project...

```

If it only printed those messages, I could just let this go. The bigger issue, however, is that many of the compiled files are missing from the coverage report. There is a 2-level directory structure inside of an "include" directory, a matching 2-level directory structure inside of a "src" directory. The coverage report only includes the top level of include files (with no files from the subdirectories within the include directory), and also the test files from the "test" directory.

```
|--src
    |--subdir1
 |--subdir2
|--include
    |--subdir1
 |--subdir2
|--test
```
So, in the above directory structure, only the files in include and test were included in the coverage report. When I add the -dump flag to the llvm-cov show call, I do see the 55 entries, all with 0x0 hash values.

Here is an example of the -dump output:

```
[build] warning: 55 functions have mismatched data
[build] hash-mismatch: No profile record found for '?getCode@HashCoder@@QEAAHXZ' with hash = 0x0
[build] hash-mismatch: No profile record found for '?hashCode@String@@UEBAHXZ' with hash = 0x0
[build] hash-mismatch: No profile record found for '??8String@@UEBA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z' with hash = 0x0
[build] hash-mismatch: No profile record found for '??0String@@QEAA@PEBD@Z' with hash = 0x0
[build] hash-mismatch: No profile record found for '??0String@@QEAA@PEAD@Z' with hash = 0x0
[build] hash-mismatch: No profile record found for '??4String@@QEAAAEAV0@AEBV0@@Z' with hash = 0x0
[build] hash-mismatch: No profile record found for '??4String@@QEAAAEAV0@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z' with hash = 0x0
[build] hash-mismatch: No profile record found for '??4String@@QEAAAEAV0@PEBD@Z' with hash = 0x0
[build] hash-mismatch: No profile record found for '??BString@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ' with hash = 0x0
[build] hash-mismatch: No profile record found for '?begin@String@@QEAA?AUiterator@1@XZ' with hash = 0x0
[build] hash-mismatch: No profile record found for '?end@String@@QEAA?AUiterator@1@XZ' with hash = 0x0
[build] hash-mismatch: No profile record found for '?length@String@@QEBA_KXZ' with hash = 0x0
[build] hash-mismatch: No profile record found for '?empty@String@@QEBA_NXZ' with hash = 0x0
[build] hash-mismatch: No profile record found for '??AString@@QEAAAEAD_K@Z' with hash = 0x0
[build] hash-mismatch: No profile record found for '??AString@@QEBAAEBD_K@Z' with hash = 0x0
```

I'm not sure what else you want me to provide. In the LLVM instructions for submitting bugs, there was no mention of this type of bug, where it really has nothing to do with the compiler.


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWFuP27oR_jX0y2ANibJ8efCDvF4ji7NNL0k2B31ZUNJY4glFqiRlH__7Ykhrs7emwenxaQoUEHwhh_PNDGeGHyWck41GXLN8w_LtRAy-NXb9BfUX06NyRk9KU5_WH1vp4CgcWOyN9VhDKaovIDXwJF0A40vp3IDAeMbyTcaXsxXLt4wvW-97x7KC8R3ju0b6diinlekY3yl1GL-uemt-wcozvgt6HOO7qITH5xrKwYPoe2FRe3UC6UE6cF4qBUJDWDWFYu_RQm2kbkDAXkgLojOD9mD2YNGhsFVL2qQHh9g58OSYdCCgt6ZU2IHR6g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