Don't emit strings when the destination is ignored.

This commit is contained in:
Michael Sullivan
2012-07-13 23:03:51 -07:00
parent 5821b9ea76
commit 5c5065e8bd

View File

@@ -269,6 +269,7 @@ fn get_base_and_len(cx: block, v: ValueRef, e_ty: ty::t)
fn trans_estr(bcx: block, s: @str/~, vstore: ast::vstore, fn trans_estr(bcx: block, s: @str/~, vstore: ast::vstore,
dest: dest) -> block { dest: dest) -> block {
let _icx = bcx.insn_ctxt("tvec::trans_estr"); let _icx = bcx.insn_ctxt("tvec::trans_estr");
if dest == base::ignore { ret bcx; }
let ccx = bcx.ccx(); let ccx = bcx.ccx();
let c = alt vstore { let c = alt vstore {