Only add thunks for the most derived class. This fixes some link errors I was seeing in files generated by the vtable tester utility.
llvm-svn: 99801
This commit is contained in:
parent
383f4cc8b9
commit
800ded68b5
|
@ -1803,8 +1803,9 @@ VtableBuilder::AddMethods(BaseSubobject Base, uint64_t BaseOffsetInLayoutClass,
|
|||
ComputeThisAdjustment(OverriddenMD, BaseOffsetInLayoutClass,
|
||||
Overrider);
|
||||
|
||||
if (ThisAdjustment.VCallOffsetOffset) {
|
||||
// This is a virtual thunk, add it.
|
||||
if (ThisAdjustment.VCallOffsetOffset &&
|
||||
Overrider.Method->getParent() == MostDerivedClass) {
|
||||
// This is a virtual thunk for the most derived class, add it.
|
||||
AddThunk(Overrider.Method,
|
||||
ThunkInfo(ThisAdjustment, ReturnAdjustment()));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue