summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBuiltin.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-02-09 02:48:28 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-02-09 02:48:28 +0000
commita7566f163ae322e478bd0ef1cc49978475549a02 (patch)
treeb63a5558c31c069d2582b74b49d82fb3af2a3e80 /clang/lib/CodeGen/CGBuiltin.cpp
parentc3adf44885d75326b607b1772c5d3618b7f91ae2 (diff)
downloadbcm5719-llvm-a7566f163ae322e478bd0ef1cc49978475549a02.tar.gz
bcm5719-llvm-a7566f163ae322e478bd0ef1cc49978475549a02.zip
IRgen: Add CreateMemTemp, for creating an temporary memory object for a particular type, and flood fill. - CreateMemTemp sets the alignment on the alloca correctly, which fixes a great many places in IRgen where we were doing the wrong thing.
- This fixes many many more places than the test case, but my feeling is we need to audit alignment systematically so I'm not inclined to try hard to test the individual fixes in this patch. If this bothers you, patches welcome! PR6240. llvm-svn: 95648
Diffstat (limited to 'clang/lib/CodeGen/CGBuiltin.cpp')
-rw-r--r--clang/lib/CodeGen/CGBuiltin.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 4ba6a2484b6..beaf7b89c00 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -657,8 +657,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
// Unknown builtin, for now just dump it out and return undef.
if (hasAggregateLLVMType(E->getType()))
- return RValue::getAggregate(CreateTempAlloca(ConvertTypeForMem(
- E->getType())));
+ return RValue::getAggregate(CreateMemTemp(E->getType()));
return RValue::get(llvm::UndefValue::get(ConvertType(E->getType())));
}
OpenPOWER on IntegriCloud