summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetData.cpp
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2006-12-08 18:06:16 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2006-12-08 18:06:16 +0000
commitdcb3c978c429fe6829ea567ee9f536547786d2d5 (patch)
tree40c6361166f703108484cd6d1318213879821918 /llvm/lib/Target/TargetData.cpp
parent78f9389d79e56243b2f9a70c060d803f794ffd89 (diff)
downloadbcm5719-llvm-dcb3c978c429fe6829ea567ee9f536547786d2d5.tar.gz
bcm5719-llvm-dcb3c978c429fe6829ea567ee9f536547786d2d5.zip
Packed Structures
llvm-svn: 32361
Diffstat (limited to 'llvm/lib/Target/TargetData.cpp')
-rw-r--r--llvm/lib/Target/TargetData.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp
index 03a232c6714..6dfeefde5f7 100644
--- a/llvm/lib/Target/TargetData.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud