summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-02-15 01:23:36 +0000
committerJohn McCall <rjmccall@apple.com>2010-02-15 01:23:36 +0000
commit7538eec67b4e08ace83e35647845619688bbd2f6 (patch)
tree5eb08bfebdf56d6be81071e2351cd688ee9d23ec
parent4d8feb11ddb62d205545017fed4ac0adc182451f (diff)
downloadbcm5719-llvm-7538eec67b4e08ace83e35647845619688bbd2f6.tar.gz
bcm5719-llvm-7538eec67b4e08ace83e35647845619688bbd2f6.zip
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. llvm-svn: 96204
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index ad4fd63cbf6..830954fd10c 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/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);
}
OpenPOWER on IntegriCloud