llvm-svn: 81078
This commit is contained in:
Mike Stump 2009-09-05 09:24:43 +00:00
parent 69bbd6ce84
commit c9eb1727db
1 changed files with 7 additions and 6 deletions

View File

@ -1028,7 +1028,7 @@ public:
uint64_t o = Offset + Layout.getBaseClassOffset(Base); uint64_t o = Offset + Layout.getBaseClassOffset(Base);
StartNewTable(); StartNewTable();
Index_t AP; Index_t AP;
AP = GenerateVtableForBase(Base, MorallyVirtual, o, false); AP = GenerateVtableForBase(Base, MorallyVirtual, o, false, RD);
OverrideMethods(RD, AP, MorallyVirtual, o); OverrideMethods(RD, AP, MorallyVirtual, o);
InstallThunks(AP); InstallThunks(AP);
} }
@ -1097,8 +1097,9 @@ public:
} }
int64_t GenerateVtableForBase(const CXXRecordDecl *RD, int64_t GenerateVtableForBase(const CXXRecordDecl *RD,
bool MorallyVirtual, int64_t Offset, bool MorallyVirtual = false, int64_t Offset = 0,
bool ForVirtualBase) { bool ForVirtualBase = false,
const CXXRecordDecl *FinalD = 0) {
if (!RD->isDynamicClass()) if (!RD->isDynamicClass())
return 0; return 0;
@ -1137,7 +1138,7 @@ public:
StartNewTable(); StartNewTable();
int64_t BaseOffset = BLayout.getVBaseClassOffset(Base); int64_t BaseOffset = BLayout.getVBaseClassOffset(Base);
Index_t AP; Index_t AP;
AP = GenerateVtableForBase(Base, true, BaseOffset, true); AP = GenerateVtableForBase(Base, true, BaseOffset, true, RD);
OverrideMethods(RD, AP, true, BaseOffset); OverrideMethods(RD, AP, true, BaseOffset);
InstallThunks(AP); InstallThunks(AP);
} }
@ -1171,7 +1172,7 @@ public:
if (I == IndexFor.end()) { if (I == IndexFor.end()) {
std::vector<llvm::Constant *> methods; std::vector<llvm::Constant *> methods;
VtableBuilder b(methods, RD, CGM); VtableBuilder b(methods, RD, CGM);
b.GenerateVtableForBase(RD, false, 0, false); b.GenerateVtableForBase(RD);
b.GenerateVtableForVBases(RD); b.GenerateVtableForVBases(RD);
register_index(RD, b.getIndex()); register_index(RD, b.getIndex());
I = IndexFor.find(RD); I = IndexFor.find(RD);
@ -1199,7 +1200,7 @@ llvm::Value *CodeGenFunction::GenerateVtable(const CXXRecordDecl *RD) {
VtableBuilder b(methods, RD, CGM); VtableBuilder b(methods, RD, CGM);
// First comes the vtables for all the non-virtual bases... // First comes the vtables for all the non-virtual bases...
Offset = b.GenerateVtableForBase(RD, false, 0, false); Offset = b.GenerateVtableForBase(RD);
// then the vtables for all the virtual bases. // then the vtables for all the virtual bases.
b.GenerateVtableForVBases(RD); b.GenerateVtableForVBases(RD);