aboutsummaryrefslogtreecommitdiff
path: root/src/comp
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-04-28 20:16:32 -0700
committerPatrick Walton <[email protected]>2011-04-28 20:16:32 -0700
commit6daf440037cb10baab332fde2b471712a3a42c76 (patch)
tree0dbe6bc0777288b17e9d097fc55ae0e9ef118df6 /src/comp
parentrustc: Add some value names to the vec append glue function. Un-XFAIL vec-gro... (diff)
downloadrust-6daf440037cb10baab332fde2b471712a3a42c76.tar.xz
rust-6daf440037cb10baab332fde2b471712a3a42c76.zip
rustc: Fix vec append glue for strings. Add a test case.
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/middle/trans.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index 61ccaba2..ec0e53d9 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -7454,7 +7454,7 @@ fn trans_vec_append_glue(@local_ctxt cx) {
auto copy_src_cx = new_sub_block_ctxt(bcx, "copy new <- src");
auto pp0 = alloca(bcx, T_ptr(T_i8()));
- bcx.build.Store(vec_p1(bcx, llnew_vec), pp0);
+ bcx.build.Store(vec_p1_adjusted(bcx, llnew_vec, llskipnull), pp0);
llvm.LLVMSetValueName(pp0, _str.buf("pp0"));
bcx.build.CondBr(bcx.build.TruncOrBitCast
@@ -7506,8 +7506,10 @@ fn trans_vec_append_glue(@local_ctxt cx) {
vec_p0(copy_dst_cx, lldst_vec),
n_bytes).bcx;
- put_vec_fill(copy_dst_cx, llnew_vec, n_bytes);
- copy_dst_cx.build.Store(vec_p1(copy_dst_cx, llnew_vec), pp0);
+ put_vec_fill(copy_dst_cx, llnew_vec, vec_fill(copy_dst_cx, lldst_vec));
+
+ copy_dst_cx.build.Store(vec_p1_adjusted(copy_dst_cx, llnew_vec,
+ llskipnull), pp0);
copy_dst_cx.build.Br(copy_src_cx.llbb);
@@ -7520,8 +7522,9 @@ fn trans_vec_append_glue(@local_ctxt cx) {
n_bytes).bcx;
put_vec_fill(copy_src_cx, llnew_vec,
- copy_src_cx.build.Add(vec_fill(copy_src_cx,
- llnew_vec),
+ copy_src_cx.build.Add(vec_fill_adjusted(copy_src_cx,
+ llnew_vec,
+ llskipnull),
n_bytes));
// Write new_vec back through the alias we were given.