Shuffle some code around; this will make it easier to use the new layout code for address points.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99461 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGVTT.cpp b/lib/CodeGen/CGVTT.cpp
index 66a9696..863eac3 100644
--- a/lib/CodeGen/CGVTT.cpp
+++ b/lib/CodeGen/CGVTT.cpp
@@ -53,26 +53,10 @@
 
     llvm::Constant *&CtorVtable = CtorVtables[Base];
     if (!CtorVtable) {
-      // Build the vtable.
-      CodeGenVTables::CtorVtableInfo Info
-        = CGM.getVTables().getCtorVtable(Class, Base, BaseIsVirtual);
-      
-      CtorVtable = Info.Vtable;
-      
-      // Add the address points for this base.
-      for (CodeGenVTables::AddressPointsMapTy::const_iterator I =
-           Info.AddressPoints.begin(), E = Info.AddressPoints.end(); 
-           I != E; ++I) {
-        uint64_t &AddressPoint = 
-          CtorVtableAddressPoints[std::make_pair(Base.getBase(), I->first)];
-        
-        // Check if we already have the address points for this base.
-        if (AddressPoint)
-          break;
-
-        // Otherwise, insert it.
-        AddressPoint = I->second;
-      }      
+      // Get the vtable.
+      CtorVtable = 
+        CGM.getVTables().GenerateConstructionVTable(Class, Base, BaseIsVirtual, 
+                                                    CtorVtableAddressPoints);
     }
     
     return CtorVtable;
@@ -336,18 +320,6 @@
   return GV;
 }
 
-CodeGenVTables::CtorVtableInfo 
-CodeGenVTables::getCtorVtable(const CXXRecordDecl *RD, 
-                            const BaseSubobject &Base, bool BaseIsVirtual) {
-  CtorVtableInfo Info;
-  
-  Info.Vtable = GenerateVtable(llvm::GlobalValue::InternalLinkage,
-                               /*GenerateDefinition=*/true,
-                               RD, Base.getBase(), Base.getBaseOffset(),
-                               BaseIsVirtual, Info.AddressPoints);
-  return Info;
-}
-
 llvm::GlobalVariable *CodeGenVTables::getVTT(const CXXRecordDecl *RD) {
   return GenerateVTT(llvm::GlobalValue::ExternalLinkage, 
                      /*GenerateDefinition=*/false, RD);