Skip to content

Commit

Permalink
Update llvmconst, to represent empty fields
Browse files Browse the repository at this point in the history
We used to handle empty fields by skipping them entirely. With the tuple change, I believe this was switched to be represented as a zero-length LLVM array.
  • Loading branch information
Keno committed Apr 28, 2015
1 parent 6438188 commit 209a9ec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/intrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@ static Constant *julia_const_to_llvm(jl_value_t *e)
JL_GC_POP();
return NULL;
}
if (val->getType() != NoopType)
fields[llvm_nf++] = val;
fields[llvm_nf++] = val;
}
JL_GC_POP();
Type *t = julia_struct_to_llvm(jt);
Expand Down

1 comment on commit 209a9ec

@vtjnash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's also a type_is_ghost function now in codegen.cpp that should be used to filter any empty fields

Please sign in to comment.