summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGVTT.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-03-25 00:35:49 +0000
committerAnders Carlsson <andersca@mac.com>2010-03-25 00:35:49 +0000
commit0534b0201eb8a9e443737f203e15c8a24b24ccbf (patch)
tree0d9a4676fed3c5c7e172fce1032b5766df4f2473 /clang/lib/CodeGen/CGVTT.cpp
parent031296e3169b9901db4637b0a7bad31d27566409 (diff)
downloadbcm5719-llvm-0534b0201eb8a9e443737f203e15c8a24b24ccbf.tar.gz
bcm5719-llvm-0534b0201eb8a9e443737f203e15c8a24b24ccbf.zip
Shuffle some code around; this will make it easier to use the new layout code for address points.
llvm-svn: 99461
Diffstat (limited to 'clang/lib/CodeGen/CGVTT.cpp')
-rw-r--r--clang/lib/CodeGen/CGVTT.cpp36
1 files changed, 4 insertions, 32 deletions
diff --git a/clang/lib/CodeGen/CGVTT.cpp b/clang/lib/CodeGen/CGVTT.cpp
index 66a96967de9..863eac30d46 100644
--- a/clang/lib/CodeGen/CGVTT.cpp
+++ b/clang/lib/CodeGen/CGVTT.cpp
@@ -53,26 +53,10 @@ class VTTBuilder {
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 @@ CodeGenVTables::GenerateVTT(llvm::GlobalVariable::LinkageTypes Linkage,
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);
OpenPOWER on IntegriCloud