<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [llvm-profdata/llvm-cov] coverage broken for C++ when built with clang-cl"
href="https://bugs.llvm.org/show_bug.cgi?id=37561">37561</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[llvm-profdata/llvm-cov] coverage broken for C++ when built with clang-cl
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>6.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>stefan.schmidt-bilkenroth@gemalto.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>I am building libraries with unit tests to create coverage mappings.
When building on Mac, all is fine.
When building pure C, all is fine.
When the build includes C++ and is built with clang-cl the following happens:
1. default.profraw is created
2. llvm-profdata show --all-functions default.profraw works as expected
3. use llvm-profdata merge default.profraw -o default.profdata executes without
error
4. llvm-cov show -instr-profile default.profdata sample.exe prompts the error:
--> "Failed to load coverage: Malformed instrumentation profile data"
It does not matter if step 4 is done on Mac or Windows.
It looks to me like the Microsoft Name Mangling is somehow causing
llvm-profdata tool to write a broken profdata file, which then can't be used by
llvm-cov. As mentioned, all fine when building the same sample on Mac and also
no issue, when C++ is excluded from instrumentation.</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>