Fix vbtable indices when a class shares the vbptr with a non-virtual base

llvm-svn: 194082
This commit is contained in:
Timur Iskhodzhanov
2013-11-05 15:54:58 +00:00
parent 41778fd28f
commit 5877663622
13 changed files with 245 additions and 108 deletions

View File

@@ -65,8 +65,8 @@ CodeGenVTables::EmitVTTDefinition(llvm::GlobalVariable *VTT,
uint64_t AddressPoint;
if (VTTVT.getBase() == RD) {
// Just get the address point for the regular vtable.
AddressPoint = VTContext.getVTableLayout(RD)
.getAddressPoint(i->VTableBase);
AddressPoint =
ItaniumVTContext.getVTableLayout(RD).getAddressPoint(i->VTableBase);
assert(AddressPoint != 0 && "Did not find vtable address point!");
} else {
AddressPoint = VTableAddressPoints[i->VTableIndex].lookup(i->VTableBase);