rustc: Allow glue to be emitted even for scalar types; this is necessary to support compare glue
This commit is contained in:
parent
6599b310f7
commit
d9d5eb82a7
1 changed files with 40 additions and 45 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue