]> granicus.if.org Git - clang/commitdiff
Cleanups, no functionality change yet.
authorAnders Carlsson <andersca@mac.com>
Wed, 10 Mar 2010 22:16:06 +0000 (22:16 +0000)
committerAnders Carlsson <andersca@mac.com>
Wed, 10 Mar 2010 22:16:06 +0000 (22:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98196 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/RecordLayoutBuilder.cpp
lib/AST/RecordLayoutBuilder.h

index 22285ca420328c6707ff26d2c9a68814866eec92..68e54fd1df66299067b8378c48945d6f3d99c320 100644 (file)
@@ -57,9 +57,6 @@ ASTRecordLayoutBuilder::LayoutNonVirtualBases(const CXXRecordDecl *RD) {
   }
 }
 
-// Helper routines related to the abi definition from:
-//   http://www.codesourcery.com/public/cxx-abi/abi.html
-//
 /// IsNearlyEmpty - Indicates when a class has a vtable pointer, but
 /// no other data.
 bool ASTRecordLayoutBuilder::IsNearlyEmpty(const CXXRecordDecl *RD) const {
index d4171d3cc9a98515979148b69e0649b757f398ef..ef22060b8730f99390e0ecca840a50a4bffeb65d 100644 (file)
@@ -105,15 +105,25 @@ class ASTRecordLayoutBuilder {
   /// placed, in bits.
   uint64_t LayoutBase(const CXXRecordDecl *RD);
   
-  void LayoutVtable(const CXXRecordDecl *RD);
+  /// LayoutNonVirtualBases - Determines the primary base class (if any) and 
+  /// lays it out. Will then proceed to lay out all non-virtual base clasess.
   void LayoutNonVirtualBases(const CXXRecordDecl *RD);
-  void LayoutBaseNonVirtually(const CXXRecordDecl *RD, bool IsVBase);
-  void LayoutVirtualBase(const CXXRecordDecl *RD);
+
+  /// LayoutNonVirtualBase - Lays out a single non-virtual base.
+  void LayoutNonVirtualBase(const CXXRecordDecl *RD);
+
+  /// LayoutVirtualBases - Lays out all the virtual bases.
   void LayoutVirtualBases(const CXXRecordDecl *Class, const CXXRecordDecl *RD,
                           const CXXRecordDecl *PB, uint64_t Offset, 
                           llvm::SmallSet<const CXXRecordDecl*, 32> &mark,
                      llvm::SmallSet<const CXXRecordDecl*, 32> &IndirectPrimary);
 
+  /// LayoutVirtualBase - Lays out a single virtual base.
+  void LayoutVirtualBase(const CXXRecordDecl *RD);
+
+  void LayoutVtable(const CXXRecordDecl *RD);
+  void LayoutBaseNonVirtually(const CXXRecordDecl *RD, bool IsVBase);
+
   /// canPlaceRecordAtOffset - Return whether a record (either a base class
   /// or a field) can be placed at the given offset. 
   /// Returns false if placing the record will result in two components