[cfe-commits] r98196 - in /cfe/trunk/lib/AST: RecordLayoutBuilder.cpp RecordLayoutBuilder.h

Anders Carlsson andersca at mac.com
Wed Mar 10 14:16:06 PST 2010


Author: andersca
Date: Wed Mar 10 16:16:06 2010
New Revision: 98196

URL: http://llvm.org/viewvc/llvm-project?rev=98196&view=rev
Log:
Cleanups, no functionality change yet.

Modified:
    cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
    cfe/trunk/lib/AST/RecordLayoutBuilder.h

Modified: cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/RecordLayoutBuilder.cpp?rev=98196&r1=98195&r2=98196&view=diff
==============================================================================
--- cfe/trunk/lib/AST/RecordLayoutBuilder.cpp (original)
+++ cfe/trunk/lib/AST/RecordLayoutBuilder.cpp Wed Mar 10 16:16:06 2010
@@ -57,9 +57,6 @@
   }
 }
 
-// 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 {

Modified: cfe/trunk/lib/AST/RecordLayoutBuilder.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/RecordLayoutBuilder.h?rev=98196&r1=98195&r2=98196&view=diff
==============================================================================
--- cfe/trunk/lib/AST/RecordLayoutBuilder.h (original)
+++ cfe/trunk/lib/AST/RecordLayoutBuilder.h Wed Mar 10 16:16:06 2010
@@ -105,15 +105,25 @@
   /// 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 





More information about the cfe-commits mailing list