From 45e00ec3f4dd6289cd14021ef1ee35568b4928c6 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Sun, 28 Sep 2008 21:35:04 +0200 Subject: LLVM compiler: Simplify allocation of closures. --- MLKLLVMCompiler.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'MLKLLVMCompiler.mm') diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index 4a1095e..ae9773b 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -615,7 +615,7 @@ static Constant builder.SetInsertPoint (outerBlock); NSArray *freeVariables = [[self freeVariables] allObjects]; - Value *closure_data = builder.CreateMalloc (PointerTy, + Value *closure_data = builder.CreateAlloca (PointerTy, ConstantInt::get(Type::Int32Ty, (uint32_t)[freeVariables count], false)); -- cgit v1.2.3