[cfe-commits] r90746 - /cfe/trunk/lib/CodeGen/CGVtable.cpp
Eli Friedman
eli.friedman at gmail.com
Sun Dec 6 20:38:34 PST 2009
Author: efriedma
Date: Sun Dec 6 22:38:34 2009
New Revision: 90746
URL: http://llvm.org/viewvc/llvm-project?rev=90746&view=rev
Log:
Tweak the formula for non-virtual offsets to something which appears a bit
more accurate.
Modified:
cfe/trunk/lib/CodeGen/CGVtable.cpp
Modified: cfe/trunk/lib/CodeGen/CGVtable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVtable.cpp?rev=90746&r1=90745&r2=90746&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Sun Dec 6 22:38:34 2009
@@ -376,8 +376,9 @@
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) {
@@ -844,8 +845,7 @@
return true;
}
- // FIXME: finish off
- int64_t NonVirtualAdjustment = VCallOffset[OGD] - OverrideOffset/8;
+ int64_t NonVirtualAdjustment = -VCallOffset[OGD] + OverrideOffset/8;
if (NonVirtualAdjustment) {
ThunkAdjustment ThisAdjustment(NonVirtualAdjustment, 0);
More information about the cfe-commits
mailing list