From 99281065366dad75b16b3344d76ddcf64150c677 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Thu, 18 Sep 2014 22:05:54 +0000 Subject: MS ABI: Don't ICE for pointers to pointers to members of incomplete classes CodeGen would try to come up with an LLVM IR type for a pointer to member type on the way to forming an LLVM IR type for a pointer to pointer to member type. However, if the pointer to member representation has not been locked in yet, we would not be able to come up with a pointer to member IR type. In these cases, make the pointer to member type an incomplete type. This will make the pointer to pointer to member type a pointer to an incomplete type. If the class eventually obtains an inheritance model, we will make the pointer to member type represent the actual inheritance model. Differential Revision: http://reviews.llvm.org/D5373 llvm-svn: 218084 --- clang/lib/CodeGen/CGCXXABI.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/lib/CodeGen/CGCXXABI.h') diff --git a/clang/lib/CodeGen/CGCXXABI.h b/clang/lib/CodeGen/CGCXXABI.h index b7ce0b07e57..f021e886c02 100644 --- a/clang/lib/CodeGen/CGCXXABI.h +++ b/clang/lib/CodeGen/CGCXXABI.h @@ -161,6 +161,10 @@ public: return true; } + virtual bool isTypeInfoCalculable(QualType Ty) const { + return !Ty->isIncompleteType(); + } + /// Create a null member pointer of the given type. virtual llvm::Constant *EmitNullMemberPointer(const MemberPointerType *MPT); -- cgit v1.2.3