Drop the unneeded VBase field from MethodInfo in the VFTableBuilder class

llvm-svn: 193164
This commit is contained in:
Timur Iskhodzhanov 2013-10-22 14:50:20 +00:00
parent 2794c47243
commit 8b14242fe5
1 changed files with 5 additions and 12 deletions

View File

@ -2483,10 +2483,6 @@ private:
/// this method's base has, or zero.
const uint64_t VBTableIndex;
/// VBase - If nonnull, holds the last vbase which contains the vfptr that
/// the method definition is adjusted to.
const CXXRecordDecl *VBase;
/// VFTableIndex - The index in the vftable that this method has.
const uint64_t VFTableIndex;
@ -2495,13 +2491,11 @@ private:
/// or used for vcalls in the most derived class.
bool Shadowed;
MethodInfo(uint64_t VBTableIndex, const CXXRecordDecl *VBase,
uint64_t VFTableIndex)
: VBTableIndex(VBTableIndex), VBase(VBase), VFTableIndex(VFTableIndex),
MethodInfo(uint64_t VBTableIndex, uint64_t VFTableIndex)
: VBTableIndex(VBTableIndex), VFTableIndex(VFTableIndex),
Shadowed(false) {}
MethodInfo()
: VBTableIndex(0), VBase(0), VFTableIndex(0), Shadowed(false) {}
MethodInfo() : VBTableIndex(0), VFTableIndex(0), Shadowed(false) {}
};
typedef llvm::DenseMap<const CXXMethodDecl *, MethodInfo> MethodInfoMapTy;
@ -2579,7 +2573,7 @@ private:
// and the entries shadowed by return adjusting thunks.
if (MD->getParent() != MostDerivedClass || MI.Shadowed)
continue;
MethodVFTableLocation Loc(MI.VBTableIndex, MI.VBase,
MethodVFTableLocation Loc(MI.VBTableIndex, WhichVFPtr.LastVBase,
WhichVFPtr.VFPtrOffset, MI.VFTableIndex);
if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD)) {
MethodVFTableLocations[GlobalDecl(DD, Dtor_Deleting)] = Loc;
@ -2873,7 +2867,6 @@ void VFTableBuilder::AddMethods(BaseSubobject Base, unsigned BaseDepth,
// No return adjustment needed - just replace the overridden method info
// with the current info.
MethodInfo MI(OverriddenMethodInfo.VBTableIndex,
OverriddenMethodInfo.VBase,
OverriddenMethodInfo.VFTableIndex);
MethodInfoMap.erase(OverriddenMDIterator);
@ -2919,7 +2912,7 @@ void VFTableBuilder::AddMethods(BaseSubobject Base, unsigned BaseDepth,
// it requires return adjustment. Insert the method info for this method.
unsigned VBIndex =
LastVBase ? GetVBTableIndex(MostDerivedClass, LastVBase) : 0;
MethodInfo MI(VBIndex, LastVBase, Components.size());
MethodInfo MI(VBIndex, Components.size());
assert(!MethodInfoMap.count(MD) &&
"Should not have method info for this method yet!");