<div dir="ltr">Tiny update: I missed a MarkVTableUsed() call in SemaInit.cpp. After removing that, Sema::BasePathInvolvesVirtualBase() is dead, so remove that too.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 13, 2015 at 11:44 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 Tue, Jan 13, 2015 at 11:24 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Tue, Jan 13, 2015 at 11:22 AM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Tue, Jan 13, 2015 at 11:11 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:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>I'm concerned that if you don't mark the vtable used enough, then codegen will crash trying to emit a vtable for a class that it assumed would be marked used because it's compiling a virtual call to a method of such a class. However, it looks like Rafael completely nuked the available_externally vtable emission optimization in r189852, which I forgot about. The vtable code still has lots of rigging to allow available_externally vtable emission, though.</div></div></div></blockquote><div><br></div></span><div>At the moment, the only thing in coding adding to the DeferredVTables vector in codegen is getAddrOfVTable(), and that's only called for structor body emission (and apple kext vcalls). So I think this should be fine.</div></div></div></div></blockquote><div><br></div></span><div>Right, but we used to call it more, prior to PR13124 and r189852. I'm reading that bug to see if it's something we want to add back.</div></div></div></div>
</blockquote></div><br></div></div></div><div class="gmail_extra">I'm starting to think that even if we want to bring back the available_externally vtable optimization, it should only happen optimistically and should not rely on Sema to mark the vtable used. Looking at PR13124, though, that seems difficult...</div><div class="gmail_extra"><br></div><div class="gmail_extra">Anyway, I drop my objections. The available_externally vtable optimization doesn't exist and turns out to be very hard to implement in Clang today. =/</div></div>
</blockquote></div><br></div>