<div dir="ltr">Now that vbtables are implemented, I can say that the needsVTT predicate doesn't affect vbtable generation at all.  vbtables get installed by EmitCtorCompleteObjectHandler().<div><br></div><div>John, I think Timur is working on a larger refactoring of VTableBuilder and maybe CGVTables.  This patch as is helps avoid asserts and adds a test case for it so we won't regress during the refactor, so I'd like to go forward with it.<br>
<div><br><div class="gmail_extra">
On Fri, Jun 14, 2013 at 8:11 PM, Peter Collingbourne <span dir="ltr"><<a href="mailto:peter@pcc.me.uk" target="_blank">peter@pcc.me.uk</a>></span> wrote:<br><div class="gmail_quote"><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>On Thu, Jun 06, 2013 at 11:53:11AM -0700, John McCall wrote:<br>
> On May 19, 2013, at 3:25 PM, Peter Collingbourne <<a href="mailto:peter@pcc.me.uk" target="_blank">peter@pcc.me.uk</a>> wrote:<br>
> > This function only makes sense there.  Eventually it should no longer<br>
> > be part of the CGCXXABI interface, as it is an Itanium-specific detail.<br>
><br>
> Hmm.  I'd be happier if we just went ahead and abstracted what needed<br>
> to be abstracted at the use sites here, but if you feel that this is a useful<br>
> intermediate step, go ahead.<br>
<br>
</div>I would prefer to do this once we start properly handling vbtables<br>
in constructors.<br>
<div><br>
> ><br>
> > @@ -1906,7 +1906,7 @@<br>
> >   llvm::Value *VTableAddressPoint;<br>
> ><br>
> >   // Check if we need to use a vtable from the VTT.<br>
> > -  if (CodeGenVTables::needsVTTParameter(CurGD) &&<br>
> > +  if (CGM.getCXXABI().NeedsVTTParameter(CurGD) &&<br>
><br>
> While you're in here, please cache this instead of using it twice.<br>
<br>
</div>Done.<br>
<div><br>
> This does change the code we'll emit for some ctor/dtor calls with<br>
> classes with virtual bases; does it bring us to a point where we can<br>
> add test cases for those, or do we still crash for unrelated reasons?<br>
<br>
</div>We now emit (incorrect) code for some of these instead of crashing;<br>
I've included a test case.  This should probably be rolled into the<br>
(to-be-committed) vbtable test cases, as we should be checking that<br>
vbtables are being passed around correctly in this test once that's<br>
implemented.  Reid, what do you think?<br>
<br>
Thanks,<br>
<span><font color="#888888">--<br>
Peter<br>
</font></span></blockquote></div><br></div></div></div></div>