diff options
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/back/abi.rs | 3 | ||||
| -rw-r--r-- | src/comp/middle/trans.rs | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/comp/back/abi.rs b/src/comp/back/abi.rs index 95958814..42a87623 100644 --- a/src/comp/back/abi.rs +++ b/src/comp/back/abi.rs @@ -26,7 +26,8 @@ const int general_code_alignment = 16; const int vec_elt_rc = 0; const int vec_elt_alloc = 1; const int vec_elt_fill = 2; -const int vec_elt_data = 3; +const int vec_elt_pad = 3; +const int vec_elt_data = 4; const int tydesc_field_first_param = 0; const int tydesc_field_size = 1; diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index 2e4f1d85..ee3ea2cd 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.rs @@ -372,6 +372,7 @@ fn T_vec(TypeRef t) -> TypeRef { ret T_struct(vec(T_int(), // Refcount T_int(), // Alloc T_int(), // Fill + T_int(), // Pad T_array(t, 0u) // Body elements )); } @@ -870,6 +871,7 @@ fn C_str(@crate_ctxt cx, str s) -> ValueRef { auto box = C_struct(vec(C_int(abi.const_refcount as int), C_int(len + 1u as int), // 'alloc' C_int(len + 1u as int), // 'fill' + C_int(0), // 'pad' llvm.LLVMConstString(_str.buf(s), len, False))); auto g = llvm.LLVMAddGlobal(cx.llmod, val_ty(box), |