diff options
author | Anders Carlsson <andersca@mac.com> | 2010-03-10 22:16:06 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-03-10 22:16:06 +0000 |
commit | 4c3a7b04a682ee2dbb73fd78441b07869cc3024d (patch) | |
tree | b376388885b8013de7328ed43add6e41275bfdf2 | |
parent | defd016cbab3dba44694c6f718d7e560247a1301 (diff) |
Cleanups, no functionality change yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98196 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AST/RecordLayoutBuilder.cpp | 3 | ||||
-rw-r--r-- | lib/AST/RecordLayoutBuilder.h | 16 |
2 files changed, 13 insertions, 6 deletions
diff --git a/lib/AST/RecordLayoutBuilder.cpp b/lib/AST/RecordLayoutBuilder.cpp index 22285ca420..68e54fd1df 100644 --- a/lib/AST/RecordLayoutBuilder.cpp +++ b/lib/AST/RecordLayoutBuilder.cpp @@ -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 { diff --git a/lib/AST/RecordLayoutBuilder.h b/lib/AST/RecordLayoutBuilder.h index d4171d3cc9..ef22060b87 100644 --- a/lib/AST/RecordLayoutBuilder.h +++ b/lib/AST/RecordLayoutBuilder.h @@ -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 |