Revert r90402 for now, virt.cpp is failing.
llvm-svn: 90406
This commit is contained in:
parent
e5716cbae7
commit
dabfa3cd8b
|
@ -274,20 +274,18 @@ public:
|
|||
|
||||
Thunks.erase(i);
|
||||
}
|
||||
|
||||
QualType BaseType = QualType(Thunk.ReturnType)->getPointeeType();
|
||||
QualType DerivedType =
|
||||
MD->getType()->getAs<FunctionType>()->getResultType()->getPointeeType();
|
||||
|
||||
const CXXRecordDecl *BaseDecl =
|
||||
cast<CXXRecordDecl>(BaseType->getAs<RecordType>()->getDecl());
|
||||
|
||||
const CXXRecordDecl *DerivedDecl =
|
||||
cast<CXXRecordDecl>(DerivedType->getAs<RecordType>()->getDecl());
|
||||
|
||||
// Construct the return adjustment.
|
||||
ThunkAdjustment ReturnAdjustment =
|
||||
CGM.ComputeThunkAdjustment(DerivedDecl, BaseDecl);
|
||||
QualType DerivedType =
|
||||
MD->getType()->getAs<FunctionType>()->getResultType();
|
||||
|
||||
int64_t NonVirtualAdjustment =
|
||||
getNVOffset(Thunk.ReturnType, DerivedType) / 8;
|
||||
|
||||
int64_t VirtualAdjustment =
|
||||
getVbaseOffset(Thunk.ReturnType, DerivedType);
|
||||
|
||||
ThunkAdjustment ReturnAdjustment(NonVirtualAdjustment, VirtualAdjustment);
|
||||
|
||||
CovariantThunkAdjustment Adjustment(ThisAdjustment, ReturnAdjustment);
|
||||
submethods[Index] = CGM.BuildCovariantThunk(MD, Extern, Adjustment);
|
||||
|
@ -747,7 +745,7 @@ TypeConversionRequiresAdjustment(ASTContext &Ctx,
|
|||
}
|
||||
|
||||
const CXXRecordDecl *DerivedDecl =
|
||||
cast<CXXRecordDecl>(cast<RecordType>(CanDerivedType)->getDecl());
|
||||
cast<CXXRecordDecl>(cast<RecordType>(CanDerivedType)->getDecl());
|
||||
|
||||
const CXXRecordDecl *BaseDecl =
|
||||
cast<CXXRecordDecl>(cast<RecordType>(CanBaseType)->getDecl());
|
||||
|
|
Loading…
Reference in New Issue