<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Sep 7, 2017 at 10:33 AM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div class="h5"><div class="gmail_extra"><div class="gmail_quote">On Thu, Sep 7, 2017 at 10:32 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><br></div></div></div></blockquote></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div>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... )<br></div></div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Awesome, Bob just did the same thing for CodeView for NRVO in r312034, because we don't have DW_OP_deref.</div></div></div></div></blockquote></span><div><br>Oh, hey, right... <br><br>Is this what MSVC does? That does seem unfortunate.<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div>
</blockquote></div><br></div></div></div><div class="gmail_extra">They don't do NRVO in -O0 builds.</div></div>
</blockquote></div><br></div><div class="gmail_extra">... and they don't describe variables affected by NRVO in optimized builds.</div><div class="gmail_extra"><br></div><div class="gmail_extra">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.</div></div>