summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitb84892d2d2961902cac1c45eb495c40e1b861629 (patch)
treeddbe9410a1ea8155317d51d89961525668ce4e18 /llvm/lib/Target/TargetData.cpp
parentc473d8e431a219a3c46cf5b469506b5f6d3d4e79 (diff)
downloadbcm5719-llvm-b84892d2d2961902cac1c45eb495c40e1b861629.tar.gz
bcm5719-llvm-b84892d2d2961902cac1c45eb495c40e1b861629.zip
encapsulate the rest of the StructLayout members.
llvm-svn: 34157
Diffstat (limited to 'llvm/lib/Target/TargetData.cpp')
-rw-r--r--llvm/lib/Target/TargetData.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp
index 1ebe5b5711e..adbd22a5269 100644
--- a/llvm/lib/Target/TargetData.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud