aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/TargetData.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-01-12 20:38:59 +0000
committerDuncan Sands <baldrick@free.fr>2009-01-12 20:38:59 +0000
commitceb4d1aecb9deffe59b3dcdc9a783ffde8477be9 (patch)
treeb81070777ea57a00082bbc345c47a9499d77d24d /lib/Target/TargetData.cpp
parentccca7fe6a30ec536de3823c0867806c1f86b2212 (diff)
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
Diffstat (limited to 'lib/Target/TargetData.cpp')
-rw-r--r--lib/Target/TargetData.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp
index 859b9ce52e..d543f24d98 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.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);
}
}