Now that vbtables are implemented, I can say that the needsVTT predicate doesn't affect vbtable generation at all. vbtables get installed by EmitCtorCompleteObjectHandler().
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. On Fri, Jun 14, 2013 at 8:11 PM, Peter Collingbourne <[email protected]>wrote: > On Thu, Jun 06, 2013 at 11:53:11AM -0700, John McCall wrote: > > On May 19, 2013, at 3:25 PM, Peter Collingbourne <[email protected]> > wrote: > > > This function only makes sense there. Eventually it should no longer > > > be part of the CGCXXABI interface, as it is an Itanium-specific detail. > > > > Hmm. I'd be happier if we just went ahead and abstracted what needed > > to be abstracted at the use sites here, but if you feel that this is a > useful > > intermediate step, go ahead. > > I would prefer to do this once we start properly handling vbtables > in constructors. > > > > > > > @@ -1906,7 +1906,7 @@ > > > llvm::Value *VTableAddressPoint; > > > > > > // Check if we need to use a vtable from the VTT. > > > - if (CodeGenVTables::needsVTTParameter(CurGD) && > > > + if (CGM.getCXXABI().NeedsVTTParameter(CurGD) && > > > > While you're in here, please cache this instead of using it twice. > > Done. > > > This does change the code we'll emit for some ctor/dtor calls with > > classes with virtual bases; does it bring us to a point where we can > > add test cases for those, or do we still crash for unrelated reasons? > > We now emit (incorrect) code for some of these instead of crashing; > I've included a test case. This should probably be rolled into the > (to-be-committed) vbtable test cases, as we should be checking that > vbtables are being passed around correctly in this test once that's > implemented. Reid, what do you think? > > Thanks, > -- > Peter >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
