Erm, revert for the moment; I didn't test this as thoroughly as I should have
(although it does pass regression tests).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90747 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp
index 43c0fe7..d227a5e 100644
--- a/lib/CodeGen/CGVtable.cpp
+++ b/lib/CodeGen/CGVtable.cpp
@@ -376,9 +376,8 @@
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 @@
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);