From 9df56372e8eaaefc50a9ecae66a83e608d7a5eb6 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Thu, 10 Sep 2015 21:52:00 +0000 Subject: [MS ABI] Make member pointers return true for isIncompleteType The type of a member pointer is incomplete if it has no inheritance model. This lets us reuse more general logic already embedded in clang. llvm-svn: 247346 --- clang/lib/CodeGen/CGDebugInfo.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp') diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index 61993f8d542..83b5e01deef 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1906,9 +1906,8 @@ llvm::DIType *CGDebugInfo::CreateType(const RValueReferenceType *Ty, llvm::DIType *CGDebugInfo::CreateType(const MemberPointerType *Ty, llvm::DIFile *U) { - uint64_t Size = CGM.getCXXABI().isTypeInfoCalculable(QualType(Ty, 0)) - ? CGM.getContext().getTypeSize(Ty) - : 0; + uint64_t Size = + !Ty->isIncompleteType() ? CGM.getContext().getTypeSize(Ty) : 0; llvm::DIType *ClassType = getOrCreateType(QualType(Ty->getClass(), 0), U); if (Ty->isMemberDataPointerType()) return DBuilder.createMemberPointerType( -- cgit v1.2.3