[cfe-commits] r98211 - in /cfe/trunk/lib/AST: RecordLayoutBuilder.cpp RecordLayoutBuilder.h
Anders Carlsson
andersca at mac.com
Wed Mar 10 16:21:21 PST 2010
Author: andersca
Date: Wed Mar 10 18:21:21 2010
New Revision: 98211
URL: http://llvm.org/viewvc/llvm-project?rev=98211&view=rev
Log:
Remove the IndirectPrimary parameter in LayoutVirtualBases; it's already there as a member variable.
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=98211&r1=98210&r2=98211&view=diff
==============================================================================
--- cfe/trunk/lib/AST/RecordLayoutBuilder.cpp (original)
+++ cfe/trunk/lib/AST/RecordLayoutBuilder.cpp Wed Mar 10 18:21:21 2010
@@ -181,7 +181,6 @@
// If we have a primary base class, lay it out.
if (const CXXRecordDecl *Base = PrimaryBase.getBase()) {
- printf("found primary base %s\n", Base->getQualifiedNameAsString().c_str());
if (PrimaryBase.isVirtual()) {
// We have a virtual primary base, insert it as an indirect primary base.
IndirectPrimaryBases.insert(Base);
@@ -223,8 +222,7 @@
const CXXRecordDecl *RD,
const CXXRecordDecl *PB,
uint64_t Offset,
- llvm::SmallSet<const CXXRecordDecl*, 32> &mark,
- llvm::SmallSet<const CXXRecordDecl*, 32> &IndirectPrimary) {
+ llvm::SmallSet<const CXXRecordDecl*, 32> &mark) {
for (CXXRecordDecl::base_class_const_iterator i = RD->bases_begin(),
e = RD->bases_end(); i != e; ++i) {
assert(!i->getType()->isDependentType() &&
@@ -239,9 +237,9 @@
continue;
// Mark it so we don't lay it out twice.
mark.insert(Base);
- assert (IndirectPrimary.count(Base) && "IndirectPrimary was wrong");
+ assert (IndirectPrimaryBases.count(Base) && "IndirectPrimary was wrong");
VBases.push_back(std::make_pair(Base, Offset));
- } else if (IndirectPrimary.count(Base)) {
+ } else if (IndirectPrimaryBases.count(Base)) {
// Someone else will eventually lay this out.
;
} else {
@@ -265,8 +263,7 @@
if (Base->getNumVBases()) {
const ASTRecordLayout &Layout = Ctx.getASTRecordLayout(Base);
const CXXRecordDecl *PrimaryBase = Layout.getPrimaryBaseInfo().getBase();
- LayoutVirtualBases(Class, Base, PrimaryBase, BaseOffset, mark,
- IndirectPrimary);
+ LayoutVirtualBases(Class, Base, PrimaryBase, BaseOffset, mark);
}
}
}
@@ -490,8 +487,7 @@
if (RD) {
llvm::SmallSet<const CXXRecordDecl*, 32> mark;
- LayoutVirtualBases(RD, RD, PrimaryBase.getBase(),
- 0, mark, IndirectPrimaryBases);
+ LayoutVirtualBases(RD, RD, PrimaryBase.getBase(), 0, mark);
}
// Finally, round the size of the total struct up to the alignment of the
Modified: cfe/trunk/lib/AST/RecordLayoutBuilder.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/RecordLayoutBuilder.h?rev=98211&r1=98210&r2=98211&view=diff
==============================================================================
--- cfe/trunk/lib/AST/RecordLayoutBuilder.h (original)
+++ cfe/trunk/lib/AST/RecordLayoutBuilder.h Wed Mar 10 18:21:21 2010
@@ -114,8 +114,7 @@
/// 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);
+ llvm::SmallSet<const CXXRecordDecl*, 32> &mark);
/// LayoutVirtualBase - Lays out a single virtual base.
void LayoutVirtualBase(const CXXRecordDecl *RD);
More information about the cfe-commits
mailing list