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 | f08e681ba82ac11d1315fbd360151cd6ee947cc9 (patch) | |
| tree | 70846399b8aeca9897f3c24da4460509f1a09379 /clang | |
| parent | 49de0607a85382cddf230a499c3f3f7debb6bfcd (diff) | |
| download | bcm5719-llvm-f08e681ba82ac11d1315fbd360151cd6ee947cc9.tar.gz bcm5719-llvm-f08e681ba82ac11d1315fbd360151cd6ee947cc9.zip | |
Cleanups, no functionality change yet.
llvm-svn: 98196
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/AST/RecordLayoutBuilder.cpp | 3 | ||||
| -rw-r--r-- | clang/lib/AST/RecordLayoutBuilder.h | 16 |
2 files changed, 13 insertions, 6 deletions
diff --git a/clang/lib/AST/RecordLayoutBuilder.cpp b/clang/lib/AST/RecordLayoutBuilder.cpp index 22285ca4203..68e54fd1df6 100644 --- a/clang/lib/AST/RecordLayoutBuilder.cpp +++ b/clang/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/clang/lib/AST/RecordLayoutBuilder.h b/clang/lib/AST/RecordLayoutBuilder.h index d4171d3cc9a..ef22060b873 100644 --- a/clang/lib/AST/RecordLayoutBuilder.h +++ b/clang/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 |

