Don't put 0-length array in the lltype of an arg-less variant
This seems to confuse LLVM in some very specific situations. Closes #883
This commit is contained in:
parent
b6e6f8b810
commit
e57435f68b
1 changed files with 5 additions and 1 deletions
|
|
@ -696,7 +696,11 @@ fn T_opaque_closure_ptr(cx: &crate_ctxt) -> TypeRef {
|
|||
fn T_tag(tn: &type_names, size: uint) -> TypeRef {
|
||||
let s = "tag_" + uint::to_str(size, 10u);
|
||||
if tn.name_has_type(s) { ret tn.get_type(s); }
|
||||
let t = T_struct([T_int(), T_array(T_i8(), size)]);
|
||||
let t = if size == 0u {
|
||||
T_struct([T_int()])
|
||||
} else {
|
||||
T_struct([T_int(), T_array(T_i8(), size)])
|
||||
};
|
||||
tn.associate(s, t);
|
||||
ret t;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue