1
Fork 0

rustc: Allow glue to be emitted even for scalar types; this is necessary to support compare glue

This commit is contained in:
Patrick Walton 2011-04-19 11:25:40 -07:00
parent 6599b310f7
commit d9d5eb82a7

View file

@ -1694,8 +1694,6 @@ fn make_generic_glue(@local_ctxt cx,
auto bcx = new_top_block_ctxt(fcx);
auto lltop = bcx.llbb;
if (!ty.type_is_scalar(t)) {
// Any nontrivial glue is with values passed *by alias*; this is a
// requirement since in many contexts glue is invoked indirectly and
// the caller has no idea if it's dealing with something that can be
@ -1739,9 +1737,6 @@ fn make_generic_glue(@local_ctxt cx,
make_cmp_glue(bcx, llval0, llval1, t, llcmpval);
}
}
} else {
bcx.build.RetVoid();
}
// Tie up the llallocas -> lltop edge.
new_builder(fcx.llallocas).Br(lltop);