Add support for ABIArgInfo::Expand
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56269 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index 4d90cbc..6ab227d 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/lib/CodeGen/CGDecl.cpp
@@ -219,8 +219,9 @@
const llvm::Type *LTy = ConvertType(Ty);
if (LTy->isSingleValueType()) {
// TODO: Alignment
- DeclPtr = new llvm::AllocaInst(LTy, 0, std::string(D.getName())+".addr",
- AllocaInsertPt);
+ std::string Name(D.getName());
+ Name += ".addr";
+ DeclPtr = CreateTempAlloca(LTy, Name.c_str());
// Store the initial value into the alloca.
Builder.CreateStore(Arg, DeclPtr,Ty.isVolatileQualified());