aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/TargetData.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-10 19:59:22 +0000
committerChris Lattner <sabre@nondot.org>2007-02-10 19:59:22 +0000
commitb0c39a3b4d1daa93d339493751976944b6422fd5 (patch)
tree4d9453ed7216ac3d8eca387291edad4de4f6e5cc /lib/Target/TargetData.cpp
parentb1919e2f08ecb37140af676fd2916f8d5ed7df3d (diff)
encapsulate the rest of the StructLayout members.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34157 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetData.cpp')
-rw-r--r--lib/Target/TargetData.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp
index 1ebe5b5711..adbd22a526 100644
--- a/lib/Target/TargetData.cpp
+++ b/lib/Target/TargetData.cpp
@@ -325,7 +325,7 @@ static inline void getTypeInfoABI(const Type *Ty, const TargetData *TD,
case Type::StructTyID: {
// Get the layout annotation... which is lazily created on demand.
const StructLayout *Layout = TD->getStructLayout(cast<StructType>(Ty));
- Size = Layout->StructSize; Alignment = Layout->StructAlignment;
+ Size = Layout->getSizeInBytes(); Alignment = Layout->getAlignment();
return;
}
@@ -387,9 +387,9 @@ static inline void getTypeInfoPref(const Type *Ty, const TargetData *TD,
// Get the layout annotation... which is lazily created on demand;
// enforce minimum aggregate alignment.
const StructLayout *Layout = TD->getStructLayout(cast<StructType>(Ty));
- Size = Layout->StructSize;
- Alignment = std::max(Layout->StructAlignment,
- (const unsigned int) TD->getAggMinPrefAlignment());
+ Size = Layout->getSizeInBytes();
+ Alignment = std::max(Layout->getAlignment(),
+ (const unsigned int)TD->getAggMinPrefAlignment());
return;
}