diff options
author | Mike Stump <mrs@apple.com> | 2010-01-06 03:09:19 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2010-01-06 03:09:19 +0000 |
commit | faef8a402c3cc50eea556abc7340ef8bb895440b (patch) | |
tree | 8e2d684e2e7b2f2fe78ca1c11d4de0417a62e27b /lib/CodeGen/CGVtable.cpp | |
parent | 1e5fd7f8e90e0953e5c59cbbbc130633d84a1e37 (diff) |
Reorder to avoid invalidating idx which is an accessor into VCall.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92819 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVtable.cpp')
-rw-r--r-- | lib/CodeGen/CGVtable.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index 40e774be13..d89c6692f6 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/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; } |