[PATCH] [ms-cxxabi] Move CodeGenVTables::needsVTTParameter to ItaniumCXXABI.
Peter Collingbourne
peter at pcc.me.uk
Fri Jun 14 17:11:44 PDT 2013
On Thu, Jun 06, 2013 at 11:53:11AM -0700, John McCall wrote:
> On May 19, 2013, at 3:25 PM, Peter Collingbourne <peter at pcc.me.uk> 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
More information about the cfe-commits
mailing list