зеркало из https://github.com/microsoft/clang-1.git
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
This commit is contained in:
Родитель
98a541e808
Коммит
8a8a629844
|
@ -1056,10 +1056,10 @@
|
||||||
35EF676F0DAD1D2C00B19414 /* SemaDeclCXX.cpp */,
|
35EF676F0DAD1D2C00B19414 /* SemaDeclCXX.cpp */,
|
||||||
DE704B250D0FBEBE009C7762 /* SemaDeclObjC.cpp */,
|
DE704B250D0FBEBE009C7762 /* SemaDeclObjC.cpp */,
|
||||||
DE67E7100C020ED400F66BC5 /* SemaExpr.cpp */,
|
DE67E7100C020ED400F66BC5 /* SemaExpr.cpp */,
|
||||||
DE67E70E0C020ECF00F66BC5 /* SemaExprCXX.cpp */,
|
|
||||||
DE47999B0D2EBE1A00706D2D /* SemaExprObjC.cpp */,
|
DE47999B0D2EBE1A00706D2D /* SemaExprObjC.cpp */,
|
||||||
3557D1EF0EB13BB700C59739 /* SemaInherit.cpp */,
|
3557D1EF0EB13BB700C59739 /* SemaInherit.cpp */,
|
||||||
DE3B921C0EB1A81400D01046 /* SemaInherit.h */,
|
DE3B921C0EB1A81400D01046 /* SemaInherit.h */,
|
||||||
|
DE67E70E0C020ECF00F66BC5 /* SemaExprCXX.cpp */,
|
||||||
3599299A0DE2425300A8A33E /* SemaInit.cpp */,
|
3599299A0DE2425300A8A33E /* SemaInit.cpp */,
|
||||||
357EA27C0F2526F300439B60 /* SemaLookup.cpp */,
|
357EA27C0F2526F300439B60 /* SemaLookup.cpp */,
|
||||||
35E194680ECB82FB00F21733 /* SemaNamedCast.cpp */,
|
35E194680ECB82FB00F21733 /* SemaNamedCast.cpp */,
|
||||||
|
|
|
@ -54,9 +54,6 @@ void ASTRecordLayoutBuilder::LayoutNonVirtualBase(const CXXRecordDecl *RD) {
|
||||||
Bases.push_back(RD);
|
Bases.push_back(RD);
|
||||||
BaseOffsets.push_back(Size);
|
BaseOffsets.push_back(Size);
|
||||||
|
|
||||||
// Non-virtual base class has offset too.
|
|
||||||
FieldOffsets.push_back(Size);
|
|
||||||
|
|
||||||
// Reserve space for this base.
|
// Reserve space for this base.
|
||||||
Size += BaseSize;
|
Size += BaseSize;
|
||||||
|
|
||||||
|
|
|
@ -199,9 +199,6 @@ bool CGRecordLayoutBuilder::LayoutFields(const RecordDecl *D) {
|
||||||
const ASTRecordLayout &Layout = Types.getContext().getASTRecordLayout(D);
|
const ASTRecordLayout &Layout = Types.getContext().getASTRecordLayout(D);
|
||||||
|
|
||||||
unsigned FieldNo = 0;
|
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(),
|
for (RecordDecl::field_iterator Field = D->field_begin(),
|
||||||
FieldEnd = D->field_end(); Field != FieldEnd; ++Field, ++FieldNo) {
|
FieldEnd = D->field_end(); Field != FieldEnd; ++Field, ++FieldNo) {
|
||||||
|
|
|
@ -723,10 +723,6 @@ void X86_64ABIInfo::classify(QualType Ty,
|
||||||
// Reset Lo class, this will be recomputed.
|
// Reset Lo class, this will be recomputed.
|
||||||
Current = NoClass;
|
Current = NoClass;
|
||||||
unsigned idx = 0;
|
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();
|
for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end();
|
||||||
i != e; ++i, ++idx) {
|
i != e; ++i, ++idx) {
|
||||||
uint64_t Offset = OffsetBase + Layout.getFieldOffset(idx);
|
uint64_t Offset = OffsetBase + Layout.getFieldOffset(idx);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче