[llvm-dev] [DebugInfo] Different representations of optimised-out variables in DWARF

Jeremy Morse via llvm-dev llvm-dev at lists.llvm.org
Thu Jan 28 07:52:25 PST 2021


Hi,

David wrote:
> We should never produce DWARF like this:

A patch to achieve that: https://reviews.llvm.org/D95617

On Thu, Jan 28, 2021 at 10:19 AM Djordje Todorovic
<Djordje.Todorovic at syrmia.com> wrote:
> IMPO, this works intuitively, but if you think that we should handle 2) case in some other way (e.g. just to ignore such parameter), please let me know.

As far as I understand it, we shouldn't be counting the number of
variables "processed", and instead be counting:
 * The total number of variables for each scope, by using the inlined
subprograms abstract origins to find in-scope variables that have no
location,
 * The number of concrete variables that have a DW_AT_location

The first number should remain stable regardless of how well we do at
tracking variable locations.

--
Thanks,
Jeremy


More information about the llvm-dev mailing list