[PATCH] [ms-cxxabi] Implement member pointer conversions
richard at metafoo.co.uk
Thu May 9 09:58:38 PDT 2013
Comment at: lib/CodeGen/CGCXXABI.h:188-197
@@ -187,8 +187,12 @@
/// A utility method for computing the offset required for the given
/// base-to-derived or derived-to-base member-pointer conversion.
/// Does not handle virtual conversions (in case we ever fully
/// support an ABI that allows this). Returns null if no adjustment
/// is required.
llvm::Constant *getMemberPointerAdjustment(const CastExpr *E);
+ /// \brief Computes the non-virtual adjustment needed for a member pointer
+ /// conversion along an inheritance path stored in an APValue.
+ CharUnits getMemberPointerPathAdjustment(const APValue &MP);
Somewhere in these comments we should call out the fact that the former doesn't negate the ThisAdjustment for a derived-to-base conversion, whereas the latter does.
More information about the cfe-commits