diff options
author | Duncan Sands <baldrick@free.fr> | 2009-05-09 07:06:46 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2009-05-09 07:06:46 +0000 |
commit | ec4f97dd91023f63e05e94a333cdd2d4c57efedf (patch) | |
tree | 0e48f8284a5e10d4f43e51986e586740ab6eb029 /lib/Target/TargetData.cpp | |
parent | bf5d4b2759f97a7b2a32c1ef22fbf8e3b46bc28e (diff) | |
download | external_llvm-ec4f97dd91023f63e05e94a333cdd2d4c57efedf.tar.gz external_llvm-ec4f97dd91023f63e05e94a333cdd2d4c57efedf.tar.bz2 external_llvm-ec4f97dd91023f63e05e94a333cdd2d4c57efedf.zip |
Rename PaddedSize to AllocSize, in the hope that this
will make it more obvious what it represents, and stop
it being confused with the StoreSize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71349 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetData.cpp')
-rw-r--r-- | lib/Target/TargetData.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index 29004dad28..3ff1f0b20b 100644 --- a/lib/Target/TargetData.cpp +++ b/lib/Target/TargetData.cpp @@ -58,7 +58,7 @@ StructLayout::StructLayout(const StructType *ST, const TargetData &TD) { StructAlignment = std::max(TyAlign, StructAlignment); MemberOffsets[i] = StructSize; - StructSize += TD.getTypePaddedSize(Ty); // Consume space for this data item + StructSize += TD.getTypeAllocSize(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 getTypePaddedSizeInBits(ATy->getElementType())*ATy->getNumElements(); + return getTypeAllocSizeInBits(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)getTypePaddedSize(Ty); + Result += arrayIdx * (int64_t)getTypeAllocSize(Ty); } } |