Reorder to avoid invalidating idx which is an accessor into VCall.

llvm-svn: 92819
This commit is contained in:
Mike Stump 2010-01-06 03:09:19 +00:00
parent 237b1c12be
commit 81478719a7
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}