diff options
author | Chris Lattner <sabre@nondot.org> | 2011-12-19 21:16:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-12-19 21:16:08 +0000 |
commit | 4cac9e169bd85bea592a49a0f4a0d2f37260b29a (patch) | |
tree | cc7521b2b5d705557c6a6e2053af6499c80623c3 /lib/CodeGen | |
parent | 4f1aefce52f3878cb5afeed6fdad926c7b4da603 (diff) |
Fix PR5279 - don't sliently drop alignment information on stores of types that have alignment less than the natural alignment of the type when it comes from a typedef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146908 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CGExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 2ed7b1ad81..4c23c061a7 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -1443,7 +1443,7 @@ LValue CodeGenFunction::EmitUnaryOpLValue(const UnaryOperator *E) { QualType T = E->getSubExpr()->getType()->getPointeeType(); assert(!T.isNull() && "CodeGenFunction::EmitUnaryOpLValue: Illegal type"); - LValue LV = MakeAddrLValue(EmitScalarExpr(E->getSubExpr()), T); + LValue LV = MakeNaturalAlignAddrLValue(EmitScalarExpr(E->getSubExpr()), T); LV.getQuals().setAddressSpace(ExprTy.getAddressSpace()); // We should not generate __weak write barrier on indirect reference |