Skip to content

Commit

Permalink
fixing bug in locals with strange Ptr{} types. affects copy_to().
Browse files Browse the repository at this point in the history
closes issue #233
  • Loading branch information
JeffBezanson committed Oct 18, 2011
1 parent ad97415 commit 137f241
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1452,12 +1452,11 @@ static bool store_unboxed_p(char *name, jl_codectx_t *ctx)
static AllocaInst *alloc_local(char *name, jl_codectx_t *ctx)
{
jl_value_t *jt = (*ctx->declTypes)[name];
const Type *vtype;
const Type *vtype=NULL;
if (store_unboxed_p(name, ctx))
vtype = julia_type_to_llvm(jt, ctx);
else
if (vtype == NULL)
vtype = jl_pvalue_llvmt;
assert(vtype != NULL);
AllocaInst *lv = builder.CreateAlloca(vtype, 0, name);
if (vtype != jl_pvalue_llvmt)
mark_julia_type(lv, jt);
Expand Down

0 comments on commit 137f241

Please sign in to comment.