<html>
<head>
<base href="https://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 WORKSFORME - llvm-cov: Coverage for destructors wrong with optimizations"
href="https://bugs.llvm.org/show_bug.cgi?id=34255">bug 34255</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;">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>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>WORKSFORME
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WORKSFORME - llvm-cov: Coverage for destructors wrong with optimizations"
href="https://bugs.llvm.org/show_bug.cgi?id=34255#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED WORKSFORME - llvm-cov: Coverage for destructors wrong with optimizations"
href="https://bugs.llvm.org/show_bug.cgi?id=34255">bug 34255</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>I can't reproduce this issue. Mind sharing the exact compiler flags you're
using, and the IR at both -O0 and -O1?
At -O1, I see the counter increment for Bar's destructor inlined into main():
%3 = load i64, i64* getelementptr inbounds ([1 x i64], [1 x i64]*
@__profc__ZN3BarD2Ev, i64 0, i64 0), align 8
%4 = add i64 %3, 1
store i64 %4, i64* getelementptr inbounds ([1 x i64], [1 x i64]*
@__profc__ZN3BarD2Ev, i64 0, i64 0), align 8</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>