Skip to content

Commit cdfc22a

Browse files
committed
---
yaml --- r: 1893 b: refs/heads/master c: cc221c4 h: refs/heads/master i: 1891: 917e345 v: v3
1 parent 913367d commit cdfc22a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 8b5968165f48860c1916be0c9e3534403e765522
2+
refs/heads/master: cc221c472a8f569a574240a27e113fca2ac0ae6b

trunk/src/comp/middle/metadata.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ fn ty_fn_str(vec[ty.arg] args, @ty.t out, def_str ds) -> str {
145145
}
146146

147147

148-
// Returns a Plain Old LLVM String.
148+
// Returns a Plain Old LLVM String, *without* the trailing zero byte.
149149
fn C_postr(str s) -> ValueRef {
150-
ret llvm.LLVMConstString(_str.buf(s), _str.byte_len(s), False);
150+
ret llvm.LLVMConstString(_str.buf(s), _str.byte_len(s) - 1u, False);
151151
}
152152

153153

@@ -303,8 +303,9 @@ fn encode_tag_id(&ebml.writer ebml_w, &ast.def_id id) {
303303
fn encode_tag_variant_info(@trans.crate_ctxt cx, &ebml.writer ebml_w,
304304
ast.def_id did, vec[ast.variant] variants) {
305305
for (ast.variant variant in variants) {
306-
ebml.start_tag(ebml_w, tag_items_variant);
306+
ebml.start_tag(ebml_w, tag_items_item);
307307
encode_def_id(ebml_w, variant.id);
308+
encode_kind(ebml_w, 'v' as u8);
308309
encode_tag_id(ebml_w, did);
309310
encode_type(ebml_w, trans.node_ann_type(cx, variant.ann));
310311
if (_vec.len[ast.variant_arg](variant.args) > 0u) {
@@ -356,7 +357,7 @@ fn encode_info_for_item(@trans.crate_ctxt cx, &ebml.writer ebml_w,
356357
encode_type_params(ebml_w, tps);
357358
ebml.end_tag(ebml_w);
358359

359-
encode_tag_variant_info(cx, ebml_w, did, variants);
360+
//encode_tag_variant_info(cx, ebml_w, did, variants);
360361
}
361362
case (ast.item_obj(?id, _, ?tps, ?did, ?ann)) {
362363
ebml.start_tag(ebml_w, tag_items_item);

0 commit comments

Comments
 (0)