diff options
author | Ken Dyck <kd@kendyck.com> | 2011-04-02 00:44:58 +0000 |
---|---|---|
committer | Ken Dyck <kd@kendyck.com> | 2011-04-02 00:44:58 +0000 |
commit | 413e7d216df32d7f37f7efd066f4386ac3efce22 (patch) | |
tree | 9a4e04350fd09bdd1bc447194886c2fc333afdda /lib/CodeGen/CGVTables.cpp | |
parent | 651ba520f9e1b38eeadbfc9bd21d0b7e570d69b7 (diff) |
Convert offset parameters of VTableBuilder::IsOverriderUsed() to CharUnits.
No change in functionality intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128752 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVTables.cpp')
-rw-r--r-- | lib/CodeGen/CGVTables.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/CodeGen/CGVTables.cpp b/lib/CodeGen/CGVTables.cpp index 163646f539..96ead190dc 100644 --- a/lib/CodeGen/CGVTables.cpp +++ b/lib/CodeGen/CGVTables.cpp @@ -1101,9 +1101,9 @@ private: /// C-in-D's copy of A's vtable is never referenced, so this is not /// necessary. bool IsOverriderUsed(const CXXMethodDecl *Overrider, - uint64_t BaseOffsetInLayoutClass, + CharUnits BaseOffsetInLayoutClass, const CXXRecordDecl *FirstBaseInPrimaryBaseChain, - uint64_t FirstBaseOffsetInLayoutClass) const; + CharUnits FirstBaseOffsetInLayoutClass) const; /// AddMethods - Add the methods of this base subobject and all its @@ -1500,9 +1500,9 @@ OverridesIndirectMethodInBases(const CXXMethodDecl *MD, bool VTableBuilder::IsOverriderUsed(const CXXMethodDecl *Overrider, - uint64_t BaseOffsetInLayoutClass, + CharUnits BaseOffsetInLayoutClass, const CXXRecordDecl *FirstBaseInPrimaryBaseChain, - uint64_t FirstBaseOffsetInLayoutClass) const { + CharUnits FirstBaseOffsetInLayoutClass) const { // If the base and the first base in the primary base chain have the same // offsets, then this overrider will be used. if (BaseOffsetInLayoutClass == FirstBaseOffsetInLayoutClass) @@ -1540,7 +1540,7 @@ VTableBuilder::IsOverriderUsed(const CXXMethodDecl *Overrider, // Now check if this is the primary base that is not a primary base in the // most derived class. - if (LayoutClassLayout.getVBaseClassOffsetInBits(PrimaryBase) != + if (LayoutClassLayout.getVBaseClassOffset(PrimaryBase) != FirstBaseOffsetInLayoutClass) { // We found it, stop walking the chain. break; @@ -1703,9 +1703,9 @@ VTableBuilder::AddMethods(BaseSubobject Base, CharUnits BaseOffsetInLayoutClass, // Check if this overrider is going to be used. const CXXMethodDecl *OverriderMD = Overrider.Method; - if (!IsOverriderUsed(OverriderMD, Context.toBits(BaseOffsetInLayoutClass), + if (!IsOverriderUsed(OverriderMD, BaseOffsetInLayoutClass, FirstBaseInPrimaryBaseChain, - Context.toBits(FirstBaseOffsetInLayoutClass))) { + FirstBaseOffsetInLayoutClass)) { Components.push_back(VTableComponent::MakeUnusedFunction(OverriderMD)); continue; } |