Cleanups and fixups for calculating the virtual base offsets.  WIP.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79156 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index b4469c5..3110ac0 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -362,19 +362,26 @@
   void FinishFunction(SourceLocation EndLoc=SourceLocation());
 
   llvm::Constant *GenerateRtti(const CXXRecordDecl *RD);
+  void GenerateVBaseOffsets(std::vector<llvm::Constant *> &methods,
+                            const CXXRecordDecl *RD, 
+                           llvm::SmallSet<const CXXRecordDecl *, 32> &SeenVBase,
+                            uint64_t Offset,
+                            const ASTRecordLayout &Layout, llvm::Type *Ptr8Ty);
   void GenerateVcalls(std::vector<llvm::Constant *> &methods,
                       const CXXRecordDecl *RD, llvm::Type *Ptr8Ty);
   void GenerateMethods(std::vector<llvm::Constant *> &methods,
                        const CXXRecordDecl *RD, llvm::Type *Ptr8Ty);
-void GenerateVtableForVBases(const CXXRecordDecl *RD,
-                             llvm::Constant *rtti,
-                             std::vector<llvm::Constant *> &methods,
+  void GenerateVtableForVBases(const CXXRecordDecl *RD,
+                               const CXXRecordDecl *Class,
+                               llvm::Constant *rtti,
+                               std::vector<llvm::Constant *> &methods,
                     llvm::SmallSet<const CXXRecordDecl *, 32> &IndirectPrimary);
   void GenerateVtableForBase(const CXXRecordDecl *RD,
+                             bool ForPrimary,
+                             int64_t Offset,
                              const CXXRecordDecl *Class,
                              llvm::Constant *rtti,
                              std::vector<llvm::Constant *> &methods,
-                             bool isPrimary,
                              bool ForVirtualBase,
                     llvm::SmallSet<const CXXRecordDecl *, 32> &IndirectPrimary);
   llvm::Value *GenerateVtable(const CXXRecordDecl *RD);