aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/TargetData.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/TargetData.cpp')
-rw-r--r--lib/Target/TargetData.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp
index 03a232c..6dfeefd 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)