[llvm-dev] RFC: Introduce DW_OP_LLVM_memory to describe variables in memory with dbg.value

Reid Kleckner via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 7 10:34:15 PDT 2017


On Thu, Sep 7, 2017 at 10:33 AM, Reid Kleckner <rnk at google.com> wrote:

> On Thu, Sep 7, 2017 at 10:32 AM, David Blaikie <dblaikie at gmail.com> wrote:
>
>>
>>>> Sure - this goes back to my adding the "indirect" flag to support C++
>>>> non-trivial pass by value in C++, before we had all the more general
>>>> expression support, etc. (hilariously, what was there before was even more
>>>> awesome: we encoded the type of the parameter in the DWARF as T& instead of
>>>> T... literally changing the signature of the function... )
>>>>
>>>
>>> Awesome, Bob just did the same thing for CodeView for NRVO in r312034,
>>> because we don't have DW_OP_deref.
>>>
>>
>> Oh, hey, right...
>>
>> Is this what MSVC does? That does seem unfortunate.
>>
>>>
> They don't do NRVO in -O0 builds.
>

... and they don't describe variables affected by NRVO in optimized builds.

Our struggle is that Clang does NRVO at -O0 (that's good), and there is no
CV record capable of representing what we want to do in -O0, so we do the
reference thing.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170907/40f80350/attachment.html>


More information about the llvm-dev mailing list