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 | eff7fe645b8fc5bdaf98632b9905166937143e3a (patch) | |
| tree | 604ddf2ac5ac9db4e7507a1249421bafcecae737 /clang/lib/CodeGen/CGVTables.cpp | |
| parent | 4111db657503f28537b23e481e5d9243d8d4e4ea (diff) | |
| download | llvm-eff7fe645b8fc5bdaf98632b9905166937143e3a.zip llvm-eff7fe645b8fc5bdaf98632b9905166937143e3a.tar.gz llvm-eff7fe645b8fc5bdaf98632b9905166937143e3a.tar.bz2 | |
Convert offset parameters of VTableBuilder::IsOverriderUsed() to CharUnits.
No change in functionality intended.
llvm-svn: 128752
Diffstat (limited to 'clang/lib/CodeGen/CGVTables.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGVTables.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp index 163646f..96ead19 100644 --- a/clang/lib/CodeGen/CGVTables.cpp +++ b/clang/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; } |
