diff options
author | Anders Carlsson <andersca@mac.com> | 2010-02-28 00:10:58 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-02-28 00:10:58 +0000 |
commit | 438bc427852a6d1e050727c6ec812bac1f2d669e (patch) | |
tree | 77a13615571a5b52d93867c9f697a269c15c546a /lib/CodeGen/CGVtable.cpp | |
parent | d2c3a7c567c0b9c3c19fd6c99a2afd02200f0508 (diff) |
Add new function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97353 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGVtable.cpp')
-rw-r--r-- | lib/CodeGen/CGVtable.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/CodeGen/CGVtable.cpp b/lib/CodeGen/CGVtable.cpp index aabea4ee31..ad035cd1fc 100644 --- a/lib/CodeGen/CGVtable.cpp +++ b/lib/CodeGen/CGVtable.cpp @@ -999,8 +999,8 @@ void VCallAndVBaseOffsetBuilder::AddVCallOffsets(BaseSubobject Base, FinalOverriders::OverriderInfo Overrider = Overriders->getOverrider(Base, MD); - /// The vcall offset is the offset from the virtual base to the object where - /// the function was overridden. + /// The vcall offset is the offset from the virtual base to the object + /// where the function was overridden. // FIXME: We should not use / 8 here. Offset = (int64_t)(Overrider.BaseOffset - VBaseOffset) / 8; } @@ -1237,6 +1237,12 @@ private: void LayoutVtablesForVirtualBases(const CXXRecordDecl *RD, VisitedVirtualBasesSetTy &VBases); + /// isBuildingConstructionVtable - Return whether this vtable builder is + /// building a construction vtable. + bool isBuildingConstructorVtable() const { + return MostDerivedClass != LayoutClass; + } + public: VtableBuilder(CGVtableInfo &VtableInfo, const CXXRecordDecl *MostDerivedClass, uint64_t MostDerivedClassOffset, |