[llvm-bugs] [Bug 34255] llvm-cov: Coverage for destructors wrong with optimizations

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Aug 22 11:12:08 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=34255

Vedant Kumar <vsk at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |---

--- Comment #5 from Vedant Kumar <vsk at apple.com> ---
I can reproduce the issue when I add `-target x86_64-linux-gnu`, but not on
Darwin.

I ran opt-bisect and found that it isn't an optimization issue: the IR clang
generates defines _ZN3BarD2Ev at -O0, but simply doesn't at -O1, with/without
any profiling instrumentation.

Given that the destructor we're talking about isn't called/defined I don't
think this is a bug in the instrumentation. It'd be great to have someone
familiar with the Linux ABI comment on why _ZN3BarD2Ev is never emitted.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170822/2c5bab20/attachment.html>


More information about the llvm-bugs mailing list