Erm, revert for the moment; I didn't test this as thoroughly as I should have

(although it does pass regression tests).

llvm-svn: 90747
This commit is contained in:
Eli Friedman 2009-12-07 04:45:50 +00:00
parent c5d3a6ae3d
commit c0dacee1e0
1 changed files with 3 additions and 3 deletions

View File

@ -376,9 +376,8 @@ public:
D1(printf(" vfn for %s at %d\n", MD->getNameAsString().c_str(), D1(printf(" vfn for %s at %d\n", MD->getNameAsString().c_str(),
(int)Index[GD])); (int)Index[GD]));
VCallOffset[GD] = Offset/8;
if (MorallyVirtual) { if (MorallyVirtual) {
VCallOffset[GD] = Offset/8;
Index_t &idx = VCall[GD]; Index_t &idx = VCall[GD];
// Allocate the first one, after that, we reuse the previous one. // Allocate the first one, after that, we reuse the previous one.
if (idx == 0) { if (idx == 0) {
@ -845,7 +844,8 @@ bool VtableBuilder::OverrideMethod(GlobalDecl GD, bool MorallyVirtual,
return true; return true;
} }
int64_t NonVirtualAdjustment = -VCallOffset[OGD] + OverrideOffset/8; // FIXME: finish off
int64_t NonVirtualAdjustment = VCallOffset[OGD] - OverrideOffset/8;
if (NonVirtualAdjustment) { if (NonVirtualAdjustment) {
ThunkAdjustment ThisAdjustment(NonVirtualAdjustment, 0); ThunkAdjustment ThisAdjustment(NonVirtualAdjustment, 0);