From c0dacee1e06ce43478e7a0124a2893977e60cb93 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Mon, 7 Dec 2009 04:45:50 +0000 Subject: [PATCH] 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 --- clang/lib/CodeGen/CGVtable.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clang/lib/CodeGen/CGVtable.cpp b/clang/lib/CodeGen/CGVtable.cpp index 43c0fe7de129..d227a5e47efb 100644 --- a/clang/lib/CodeGen/CGVtable.cpp +++ b/clang/lib/CodeGen/CGVtable.cpp @@ -376,9 +376,8 @@ public: D1(printf(" vfn for %s at %d\n", MD->getNameAsString().c_str(), (int)Index[GD])); - - VCallOffset[GD] = Offset/8; if (MorallyVirtual) { + VCallOffset[GD] = Offset/8; Index_t &idx = VCall[GD]; // Allocate the first one, after that, we reuse the previous one. if (idx == 0) { @@ -845,7 +844,8 @@ bool VtableBuilder::OverrideMethod(GlobalDecl GD, bool MorallyVirtual, return true; } - int64_t NonVirtualAdjustment = -VCallOffset[OGD] + OverrideOffset/8; + // FIXME: finish off + int64_t NonVirtualAdjustment = VCallOffset[OGD] - OverrideOffset/8; if (NonVirtualAdjustment) { ThunkAdjustment ThisAdjustment(NonVirtualAdjustment, 0);