]> granicus.if.org Git - clang/commitdiff
Add new function.
authorAnders Carlsson <andersca@mac.com>
Sun, 28 Feb 2010 00:10:58 +0000 (00:10 +0000)
committerAnders Carlsson <andersca@mac.com>
Sun, 28 Feb 2010 00:10:58 +0000 (00:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97353 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGVtable.cpp

index aabea4ee316b7027be4b39b3d5911cfc5ad344ff..ad035cd1fcf7b54bd7c6bbc7a5efce4f8c59c2c1 100644 (file)
@@ -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,