aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGVtable.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-12-04 03:52:52 +0000
committerAnders Carlsson <andersca@mac.com>2009-12-04 03:52:52 +0000
commitdd454bee6b17ba7fe83fff3ce6b63fed0c0498ab (patch)
treee82630c697861b58225d60f7e54f387104572795 /lib/CodeGen/CGVtable.cpp
parent0e881169afe062b9336d626ac5522d57cbcbc6d4 (diff)
More work in preparation of getting rid of the submethods loop.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90535 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVtable.cpp')
-rw-r--r--lib/CodeGen/CGVtable.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp
index defa809766..4cf158a922 100644
--- a/lib/CodeGen/CGVtable.cpp
+++ b/lib/CodeGen/CGVtable.cpp
@@ -754,7 +754,9 @@ bool VtableBuilder::OverrideMethod(GlobalDecl GD, llvm::Constant *m,
if (submethods[i] != om)
continue;
- assert(i == Methods.getIndex(OGD));
+ uint64_t Index = Methods.getIndex(OGD);
+
+ assert(i == Index);
QualType ReturnType =
MD->getType()->getAs<FunctionType>()->getResultType();
@@ -778,7 +780,7 @@ bool VtableBuilder::OverrideMethod(GlobalDecl GD, llvm::Constant *m,
Methods.OverrideMethod(OGD, GD);
- submethods[i] = m;
+ submethods[Index] = m;
ThisAdjustments.erase(i);
if (MorallyVirtual || VCall.count(OGD)) {
Index_t &idx = VCall[OGD];
@@ -811,7 +813,7 @@ bool VtableBuilder::OverrideMethod(GlobalDecl GD, llvm::Constant *m,
VirtualAdjustment);
if (!isPure && !ThisAdjustment.isEmpty())
- ThisAdjustments[i] = ThisAdjustment;
+ ThisAdjustments[Index] = ThisAdjustment;
return true;
}
@@ -822,7 +824,7 @@ bool VtableBuilder::OverrideMethod(GlobalDecl GD, llvm::Constant *m,
ThunkAdjustment ThisAdjustment(NonVirtualAdjustment, 0);
if (!isPure)
- ThisAdjustments[i] = ThisAdjustment;
+ ThisAdjustments[Index] = ThisAdjustment;
}
return true;
}