From 8a8a629844d26c24dc0147d55a32a937b14b9381 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Wed, 29 Jul 2009 18:50:06 +0000 Subject: [PATCH] No longer need to keep base class offsets in the offset table as it has its own place now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77491 91177308-0d34-0410-b5e6-96231b3b80d8 --- clang.xcodeproj/project.pbxproj | 2 +- lib/AST/RecordLayoutBuilder.cpp | 3 --- lib/CodeGen/CGRecordLayoutBuilder.cpp | 3 --- lib/CodeGen/TargetABIInfo.cpp | 4 ---- 4 files changed, 1 insertion(+), 11 deletions(-) diff --git a/clang.xcodeproj/project.pbxproj b/clang.xcodeproj/project.pbxproj index 137f5e4423..188d3b3dff 100644 --- a/clang.xcodeproj/project.pbxproj +++ b/clang.xcodeproj/project.pbxproj @@ -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 */, diff --git a/lib/AST/RecordLayoutBuilder.cpp b/lib/AST/RecordLayoutBuilder.cpp index e6479bf0f5..b09901d10d 100644 --- a/lib/AST/RecordLayoutBuilder.cpp +++ b/lib/AST/RecordLayoutBuilder.cpp @@ -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; diff --git a/lib/CodeGen/CGRecordLayoutBuilder.cpp b/lib/CodeGen/CGRecordLayoutBuilder.cpp index 11e1ee36fc..bd3cabd5bf 100644 --- a/lib/CodeGen/CGRecordLayoutBuilder.cpp +++ b/lib/CodeGen/CGRecordLayoutBuilder.cpp @@ -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(D)) - FieldNo += CXXRD->getNumBases(); for (RecordDecl::field_iterator Field = D->field_begin(), FieldEnd = D->field_end(); Field != FieldEnd; ++Field, ++FieldNo) { diff --git a/lib/CodeGen/TargetABIInfo.cpp b/lib/CodeGen/TargetABIInfo.cpp index 76d75715bd..5c8d5dd230 100644 --- a/lib/CodeGen/TargetABIInfo.cpp +++ b/lib/CodeGen/TargetABIInfo.cpp @@ -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(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);