aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/ArrayParameters.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/ArrayParameters.cc')
-rw-r--r--lib/CodeGen/ArrayParameters.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/ArrayParameters.cc b/lib/CodeGen/ArrayParameters.cc
index 09017c9..3359c66 100644
--- a/lib/CodeGen/ArrayParameters.cc
+++ b/lib/CodeGen/ArrayParameters.cc
@@ -59,6 +59,8 @@ void ArrayHandler::bindArrayParameter(const std::string &Name,
Builder->CreateStore(Ptr, Alloca);
CG.registerSymbol(Name, Alloca, ElemInfo->Name, true);
+ if (MakeCopy)
+ CG.activateStackObject(CG.registerStackObject(Alloca, ElemInfo->Name, 0, true, true), TotalElements);
}
bool ArrayHandler::emitArrayArgument(ExprAST *ArgExpr,