forked from OSchip/llvm-project
Reorder to avoid invalidating idx which is an accessor into VCall.
llvm-svn: 92819
This commit is contained in:
parent
237b1c12be
commit
81478719a7
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue