Store the unresolved class type in MemberPointerType's Class field,
from Peter Collingbourne!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86030 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCXX.cpp b/lib/CodeGen/CGCXX.cpp
index 3e854ca..d8b532e 100644
--- a/lib/CodeGen/CGCXX.cpp
+++ b/lib/CodeGen/CGCXX.cpp
@@ -291,7 +291,7 @@
const FunctionProtoType *FPT =
MPT->getPointeeType()->getAs<FunctionProtoType>();
const CXXRecordDecl *RD =
- cast<CXXRecordDecl>(cast<RecordType>(MPT->getClass())->getDecl());
+ cast<CXXRecordDecl>(MPT->getClass()->getAs<RecordType>()->getDecl());
const llvm::FunctionType *FTy =
CGM.getTypes().GetFunctionType(CGM.getTypes().getFunctionInfo(RD, FPT),