@@ -145,9 +145,9 @@ fn ty_fn_str(vec[ty.arg] args, @ty.t out, def_str ds) -> str {
145
145
}
146
146
147
147
148
- // Returns a Plain Old LLVM String.
148
+ // Returns a Plain Old LLVM String, *without* the trailing zero byte .
149
149
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) - 1 u , False ) ;
151
151
}
152
152
153
153
@@ -303,8 +303,9 @@ fn encode_tag_id(&ebml.writer ebml_w, &ast.def_id id) {
303
303
fn encode_tag_variant_info ( @trans. crate_ctxt cx , & ebml. writer ebml_w ,
304
304
ast. def_id did , vec[ ast. variant] variants ) {
305
305
for ( ast. variant variant in variants) {
306
- ebml. start_tag ( ebml_w, tag_items_variant ) ;
306
+ ebml. start_tag ( ebml_w, tag_items_item ) ;
307
307
encode_def_id ( ebml_w, variant. id ) ;
308
+ encode_kind ( ebml_w, 'v' as u8 ) ;
308
309
encode_tag_id ( ebml_w, did) ;
309
310
encode_type ( ebml_w, trans. node_ann_type ( cx, variant. ann ) ) ;
310
311
if ( _vec. len [ ast. variant_arg ] ( variant. args ) > 0 u) {
@@ -356,7 +357,7 @@ fn encode_info_for_item(@trans.crate_ctxt cx, &ebml.writer ebml_w,
356
357
encode_type_params ( ebml_w, tps) ;
357
358
ebml. end_tag ( ebml_w) ;
358
359
359
- encode_tag_variant_info ( cx, ebml_w, did, variants) ;
360
+ // encode_tag_variant_info(cx, ebml_w, did, variants);
360
361
}
361
362
case ( ast. item_obj ( ?id, _, ?tps, ?did, ?ann) ) {
362
363
ebml. start_tag ( ebml_w, tag_items_item) ;
0 commit comments