[cfe-commits] r97353 - /cfe/trunk/lib/CodeGen/CGVtable.cpp

Anders Carlsson andersca at mac.com
Sat Feb 27 16:10:58 PST 2010


Author: andersca
Date: Sat Feb 27 18:10:58 2010
New Revision: 97353

URL: http://llvm.org/viewvc/llvm-project?rev=97353&view=rev
Log:
Add new function.

Modified:
    cfe/trunk/lib/CodeGen/CGVtable.cpp

Modified: cfe/trunk/lib/CodeGen/CGVtable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVtable.cpp?rev=97353&r1=97352&r2=97353&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVtable.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVtable.cpp Sat Feb 27 18:10:58 2010
@@ -999,8 +999,8 @@
       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 @@
   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, 





More information about the cfe-commits mailing list