mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 00:21:03 +00:00
Rename getABITypeSize to getTypePaddedSize, as
suggested by Chris. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62099 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -58,7 +58,7 @@ StructLayout::StructLayout(const StructType *ST, const TargetData &TD) {
|
||||
StructAlignment = std::max(TyAlign, StructAlignment);
|
||||
|
||||
MemberOffsets[i] = StructSize;
|
||||
StructSize += TD.getABITypeSize(Ty); // Consume space for this data item
|
||||
StructSize += TD.getTypePaddedSize(Ty); // Consume space for this data item
|
||||
}
|
||||
|
||||
// Empty structures have alignment of 1 byte.
|
||||
@@ -425,7 +425,7 @@ uint64_t TargetData::getTypeSizeInBits(const Type *Ty) const {
|
||||
return getPointerSizeInBits();
|
||||
case Type::ArrayTyID: {
|
||||
const ArrayType *ATy = cast<ArrayType>(Ty);
|
||||
return getABITypeSizeInBits(ATy->getElementType())*ATy->getNumElements();
|
||||
return getTypePaddedSizeInBits(ATy->getElementType())*ATy->getNumElements();
|
||||
}
|
||||
case Type::StructTyID:
|
||||
// Get the layout annotation... which is lazily created on demand.
|
||||
@@ -568,7 +568,7 @@ uint64_t TargetData::getIndexedOffset(const Type *ptrTy, Value* const* Indices,
|
||||
|
||||
// Get the array index and the size of each array element.
|
||||
int64_t arrayIdx = cast<ConstantInt>(Indices[CurIDX])->getSExtValue();
|
||||
Result += arrayIdx * (int64_t)getABITypeSize(Ty);
|
||||
Result += arrayIdx * (int64_t)getTypePaddedSize(Ty);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user