No longer need to keep base class offsets in the offset

table as it has its own place now.

llvm-svn: 77491
This commit is contained in:
Fariborz Jahanian 2009-07-29 18:50:06 +00:00
parent bb67b827d9
commit 7be1ad814b
4 changed files with 1 additions and 11 deletions

View File

@ -1056,10 +1056,10 @@
35EF676F0DAD1D2C00B19414 /* SemaDeclCXX.cpp */,
DE704B250D0FBEBE009C7762 /* SemaDeclObjC.cpp */,
DE67E7100C020ED400F66BC5 /* SemaExpr.cpp */,
DE67E70E0C020ECF00F66BC5 /* SemaExprCXX.cpp */,
DE47999B0D2EBE1A00706D2D /* SemaExprObjC.cpp */,
3557D1EF0EB13BB700C59739 /* SemaInherit.cpp */,
DE3B921C0EB1A81400D01046 /* SemaInherit.h */,
DE67E70E0C020ECF00F66BC5 /* SemaExprCXX.cpp */,
3599299A0DE2425300A8A33E /* SemaInit.cpp */,
357EA27C0F2526F300439B60 /* SemaLookup.cpp */,
35E194680ECB82FB00F21733 /* SemaNamedCast.cpp */,

View File

@ -54,9 +54,6 @@ void ASTRecordLayoutBuilder::LayoutNonVirtualBase(const CXXRecordDecl *RD) {
Bases.push_back(RD);
BaseOffsets.push_back(Size);
// Non-virtual base class has offset too.
FieldOffsets.push_back(Size);
// Reserve space for this base.
Size += BaseSize;

View File

@ -199,9 +199,6 @@ bool CGRecordLayoutBuilder::LayoutFields(const RecordDecl *D) {
const ASTRecordLayout &Layout = Types.getContext().getASTRecordLayout(D);
unsigned FieldNo = 0;
// FIXME. This will probably change when virtual bases are supported.
if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(D))
FieldNo += CXXRD->getNumBases();
for (RecordDecl::field_iterator Field = D->field_begin(),
FieldEnd = D->field_end(); Field != FieldEnd; ++Field, ++FieldNo) {

View File

@ -723,10 +723,6 @@ void X86_64ABIInfo::classify(QualType Ty,
// Reset Lo class, this will be recomputed.
Current = NoClass;
unsigned idx = 0;
// FIXME. This will probably change when virtual bases are supported.
if (const CXXRecordDecl *CXXRD = dyn_cast<CXXRecordDecl>(RD))
idx += CXXRD->getNumBases();
for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end();
i != e; ++i, ++idx) {
uint64_t Offset = OffsetBase + Layout.getFieldOffset(idx);