[PATCH] [ms-cxxabi] Implement member pointer conversions

Richard Smith richard at metafoo.co.uk
Thu May 9 09:58:38 PDT 2013


  LGTM


================
Comment at: lib/CodeGen/CGCXXABI.h:188-197
@@ -187,8 +187,12 @@
 protected:
   /// 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.


http://llvm-reviews.chandlerc.com/D741

BRANCH
  memptr-convert

ARCANIST PROJECT
  clang



More information about the cfe-commits mailing list