diff options
author | Anders Carlsson <andersca@mac.com> | 2010-03-11 07:15:17 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-03-11 07:15:17 +0000 |
commit | 4cbe83cccbda81adb9b6e410110b7e6df694b290 (patch) | |
tree | 2a96fd51d383f88cf7f1372ae77fb0d0cc114491 /clang/lib/CodeGen/CGVtable.cpp | |
parent | e4424888e4d46b1337dca8170f3cf688b86d8a95 (diff) | |
download | bcm5719-llvm-4cbe83cccbda81adb9b6e410110b7e6df694b290.tar.gz bcm5719-llvm-4cbe83cccbda81adb9b6e410110b7e6df694b290.zip |
Rename getVirtualBaseOffsetIndex to getVirtualBaseOffsetOffset to reflect what it actually does.
llvm-svn: 98248
Diffstat (limited to 'clang/lib/CodeGen/CGVtable.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGVtable.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/clang/lib/CodeGen/CGVtable.cpp b/clang/lib/CodeGen/CGVtable.cpp index 9f792993ac4..41fdff17c67 100644 --- a/clang/lib/CodeGen/CGVtable.cpp +++ b/clang/lib/CodeGen/CGVtable.cpp @@ -1412,8 +1412,8 @@ VtableBuilder::ComputeReturnAdjustment(BaseOffset Offset) { VBaseOffsetOffsets.lookup(Offset.VirtualBase); } else { Adjustment.VBaseOffsetOffset = - VtableInfo.getVirtualBaseOffsetIndex(Offset.DerivedClass, - Offset.VirtualBase); + VtableInfo.getVirtualBaseOffsetOffset(Offset.DerivedClass, + Offset.VirtualBase); } // FIXME: Once the assert in getVirtualBaseOffsetIndex is back again, @@ -2696,7 +2696,7 @@ public: CXXRecordDecl *D = cast<CXXRecordDecl>(qD->getAs<RecordType>()->getDecl()); CXXRecordDecl *B = cast<CXXRecordDecl>(qB->getAs<RecordType>()->getDecl()); if (D != MostDerivedClass) - return CGM.getVtableInfo().getVirtualBaseOffsetIndex(D, B); + return CGM.getVtableInfo().getVirtualBaseOffsetOffset(D, B); llvm::DenseMap<const CXXRecordDecl *, Index_t>::iterator i; i = VBIndex.find(B); if (i != VBIndex.end()) @@ -3444,13 +3444,13 @@ CGVtableInfo::getAdjustments(GlobalDecl GD) { return 0; } -int64_t CGVtableInfo::getVirtualBaseOffsetIndex(const CXXRecordDecl *RD, - const CXXRecordDecl *VBase) { +int64_t CGVtableInfo::getVirtualBaseOffsetOffset(const CXXRecordDecl *RD, + const CXXRecordDecl *VBase) { ClassPairTy ClassPair(RD, VBase); - VirtualBaseClassIndiciesTy::iterator I = - VirtualBaseClassIndicies.find(ClassPair); - if (I != VirtualBaseClassIndicies.end()) + VirtualBaseClassOffsetOffsetsMapTy::iterator I = + VirtualBaseClassOffsetOffsets.find(ClassPair); + if (I != VirtualBaseClassOffsetOffsets.end()) return I->second; // FIXME: This seems expensive. Can we do a partial job to get @@ -3466,17 +3466,17 @@ int64_t CGVtableInfo::getVirtualBaseOffsetIndex(const CXXRecordDecl *RD, // Insert all types. ClassPairTy ClassPair(RD, I->first); - VirtualBaseClassIndicies.insert(std::make_pair(ClassPair, I->second)); + VirtualBaseClassOffsetOffsets.insert(std::make_pair(ClassPair, I->second)); } - I = VirtualBaseClassIndicies.find(ClassPair); + I = VirtualBaseClassOffsetOffsets.find(ClassPair); // FIXME: The assertion below assertion currently fails with the old vtable /// layout code if there is a non-virtual thunk adjustment in a vtable. // Once the new layout is in place, this return should be removed. - if (I == VirtualBaseClassIndicies.end()) + if (I == VirtualBaseClassOffsetOffsets.end()) return 0; - assert(I != VirtualBaseClassIndicies.end() && "Did not find index!"); + assert(I != VirtualBaseClassOffsetOffsets.end() && "Did not find index!"); return I->second; } |