From 63efd334081c03a29d351e4aefa00dfaf6966d8a Mon Sep 17 00:00:00 2001 From: John McCall Date: Mon, 15 Feb 2010 01:23:36 +0000 Subject: When emitting an aggregate into a temporary, make sure we set the alignment on the alloca. The fact that codegen makes this class of bug so wonderfully easy to make is embarrassing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96204 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExpr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/CGExpr.cpp') diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index ad4fd63cbf..830954fd10 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -95,7 +95,7 @@ RValue CodeGenFunction::EmitAnyExprToTemp(const Expr *E, if (hasAggregateLLVMType(E->getType()) && !E->getType()->isAnyComplexType()) - AggLoc = CreateTempAlloca(ConvertTypeForMem(E->getType()), "agg.tmp"); + AggLoc = CreateMemTemp(E->getType(), "agg.tmp"); return EmitAnyExpr(E, AggLoc, IsAggLocVolatile, /*IgnoreResult=*/false, IsInitializer); } -- cgit v1.2.3-70-g09d2