diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2006-12-08 18:06:16 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2006-12-08 18:06:16 +0000 |
commit | 38ecbf18eb9c8ca7ae08dfed4dc6fb4e3e5deb1e (patch) | |
tree | 25f918d862f8baff414df9382c194b5b5e072de1 /lib/Target/TargetData.cpp | |
parent | 8894255fc01cd8dcdccc700fdd69186d02131ffe (diff) |
Packed Structures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32361 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetData.cpp')
-rw-r--r-- | lib/Target/TargetData.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index 03a232c671..6dfeefde5f 100644 --- a/lib/Target/TargetData.cpp +++ b/lib/Target/TargetData.cpp @@ -53,7 +53,7 @@ StructLayout::StructLayout(const StructType *ST, const TargetData &TD) { unsigned TyAlign; uint64_t TySize; getTypeInfo(Ty, &TD, TySize, A); - TyAlign = A; + TyAlign = ST->isPacked() ? 1 : A; // Add padding if necessary to make the data element aligned properly... if (StructSize % TyAlign != 0) |