[PATCH] [ms-cxxabi] Move CodeGenVTables::needsVTTParameter to ItaniumCXXABI.

John McCall rjmccall at apple.com
Thu Jun 6 11:53:11 PDT 2013


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.

> 
> @@ -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.

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?

John.



More information about the cfe-commits mailing list