summaryrefslogtreecommitdiffstats
path: root/clang
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
commita93e980fbc54c55c898e9446fcc7b30f1b7fe2d2 (patch)
treeee02c9e66c2e3994f7211a6567318eb5537b42c4 /clang
parentf2f31f437160a2cb00485a02411e3420ba4404aa (diff)
downloadbcm5719-llvm-a93e980fbc54c55c898e9446fcc7b30f1b7fe2d2.tar.gz
bcm5719-llvm-a93e980fbc54c55c898e9446fcc7b30f1b7fe2d2.zip
More work in preparation of getting rid of the submethods loop.
llvm-svn: 90535
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/CodeGen/CGVtable.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGVtable.cpp b/clang/lib/CodeGen/CGVtable.cpp
index defa809766d..4cf158a9222 100644
--- a/clang/lib/CodeGen/CGVtable.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud