From 84e9ab44af3a16f66d62590505db2036ef0aa03b Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Thu, 28 Mar 2013 20:02:56 +0000 Subject: [ms-cxxabi] Correctly compute the size of member pointers Summary: This also relaxes the requirement on Windows that the member pointer class type be a complete type (http://llvm.org/PR12070). We still ask for a complete type to instantiate any templates (MSVC does this), but if that fails we continue as normal, relying on any inheritance attributes on the declaration. Reviewers: rjmccall CC: triton, timurrrr, cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D568 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178283 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/ASTContext.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib/AST/ASTContext.cpp') diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index eee7ed2fb8..6ac18a8d88 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -1496,10 +1496,7 @@ ASTContext::getTypeInfoImpl(const Type *T) const { } case Type::MemberPointer: { const MemberPointerType *MPT = cast(T); - std::pair PtrDiffInfo = - getTypeInfo(getPointerDiffType()); - Width = PtrDiffInfo.first * ABI->getMemberPointerSize(MPT); - Align = PtrDiffInfo.second; + llvm::tie(Width, Align) = ABI->getMemberPointerWidthAndAlign(MPT); break; } case Type::Complex: { -- cgit v1.2.3-18-g5258