From 4c3a7b04a682ee2dbb73fd78441b07869cc3024d Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Wed, 10 Mar 2010 22:16:06 +0000 Subject: [PATCH] Cleanups, no functionality change yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98196 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/RecordLayoutBuilder.cpp | 3 --- 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 &mark, llvm::SmallSet &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 -- 2.40.0