Get rid of the old GetNonVirtualBaseClassOffset and change all call sites to use the new version.

llvm-svn: 102274
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp
index ce0d69b..ab0805e 100644
--- a/clang/lib/CodeGen/CGExprConstant.cpp
+++ b/clang/lib/CodeGen/CGExprConstant.cpp
@@ -556,8 +556,6 @@
       const MemberPointerType *DestTy = 
         E->getType()->getAs<MemberPointerType>();
       
-      const CXXRecordDecl *BaseClass =
-        cast<CXXRecordDecl>(cast<RecordType>(SrcTy->getClass())->getDecl());
       const CXXRecordDecl *DerivedClass =
         cast<CXXRecordDecl>(cast<RecordType>(DestTy->getClass())->getDecl());
 
@@ -571,7 +569,7 @@
         
         // Check if we need to update the adjustment.
         if (llvm::Constant *Offset = 
-              CGM.GetNonVirtualBaseClassOffset(DerivedClass, BaseClass)) {
+            CGM.GetNonVirtualBaseClassOffset(DerivedClass, E->getBasePath())) {
           llvm::Constant *Values[2];
         
           Values[0] = CS->getOperand(0);