Flip the switch to always get vtables from the VTT when necessary, I've verified that clang bootstraps with this.

llvm-svn: 99800
This commit is contained in:
Anders Carlsson 2010-03-29 02:38:51 +00:00
parent 2d016af623
commit 383f4cc8b9
1 changed files with 3 additions and 7 deletions

View File

@ -1566,11 +1566,8 @@ CodeGenFunction::InitializeVTablePointer(BaseSubobject Base,
// Compute the address point.
llvm::Value *VTableAddressPoint;
// FIXME: Always use the new vtable code once we know it works.
bool UseNewVTableCode = CGM.getLangOptions().DumpVtableLayouts;
// Check if we need to use a vtable from the VTT.
if (UseNewVTableCode && CodeGenVTables::needsVTTParameter(CurGD) &&
if (CodeGenVTables::needsVTTParameter(CurGD) &&
(RD->getNumVBases() || BaseIsMorallyVirtual)) {
// Get the secondary vpointer index.
uint64_t VirtualPointerIndex =
@ -1592,8 +1589,7 @@ CodeGenFunction::InitializeVTablePointer(BaseSubobject Base,
// Compute where to store the address point.
llvm::Value *VTableField;
if (UseNewVTableCode &&
CodeGenVTables::needsVTTParameter(CurGD) && BaseIsMorallyVirtual) {
if (CodeGenVTables::needsVTTParameter(CurGD) && BaseIsMorallyVirtual) {
// We need to use the virtual base offset offset because the virtual base
// might have a different offset in the most derived class.
VTableField = GetAddressOfBaseClass(LoadCXXThis(), VTableClass, RD,