summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2010-01-06 03:09:19 +0000
committerMike Stump <mrs@apple.com>2010-01-06 03:09:19 +0000
commit81478719a73b445d19dd3d2661baf0a02cc5dca0 (patch)
tree78cd4e2d971b21690d3c57f780f2761dd610664f /clang/lib
parent237b1c12be747104996bfe52ee8c01d8b32925a4 (diff)
downloadbcm5719-llvm-81478719a73b445d19dd3d2661baf0a02cc5dca0.tar.gz
bcm5719-llvm-81478719a73b445d19dd3d2661baf0a02cc5dca0.zip
Reorder to avoid invalidating idx which is an accessor into VCall.
llvm-svn: 92819
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGVtable.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGVtable.cpp b/clang/lib/CodeGen/CGVtable.cpp
index 40e774be13b..d89c6692f6e 100644
--- a/clang/lib/CodeGen/CGVtable.cpp
+++ b/clang/lib/CodeGen/CGVtable.cpp
@@ -825,7 +825,6 @@ bool VtableBuilder::OverrideMethod(GlobalDecl GD, bool MorallyVirtual,
MD->getNameAsString().c_str(), (int)-idx-3,
(int)VCalls[idx-1], Class->getNameAsCString()));
}
- VCall[GD] = idx;
int64_t NonVirtualAdjustment = NonVirtualOffset[GD];
int64_t VirtualAdjustment =
-((idx + extra + 2) * LLVMPointerWidth / 8);
@@ -842,6 +841,7 @@ bool VtableBuilder::OverrideMethod(GlobalDecl GD, bool MorallyVirtual,
SavedAdjustments.push_back(
std::make_pair(GD, std::make_pair(OGD, ThisAdjustment)));
}
+ VCall[GD] = idx;
return true;
}
OpenPOWER on IntegriCloud