@@ -1203,6 +1203,7 @@ let (abbrev_subprogram:abbrev) =
1203
1203
(DW_AT_return_addr , DW_FORM_block1 );
1204
1204
(DW_AT_mutable , DW_FORM_flag );
1205
1205
(DW_AT_pure , DW_FORM_flag );
1206
+ (DW_AT_rust_iterator , DW_FORM_flag );
1206
1207
|])
1207
1208
;;
1208
1209
@@ -2295,6 +2296,7 @@ let dwarf_visitor
2295
2296
(id :Ast.ident )
2296
2297
(ret_slot :Ast.slot )
2297
2298
(effect :Ast.effect )
2299
+ (iter :bool )
2298
2300
(fix :fixup )
2299
2301
: unit =
2300
2302
(* NB: retpc = "top word of frame-base" by convention in ABI/x86. *)
@@ -2314,6 +2316,8 @@ let dwarf_visitor
2314
2316
(* DW_AT_return_addr *)
2315
2317
dw_form_block1 [| DW_OP_fbreg (Asm. IMM retpc); |];
2316
2318
encode_effect effect;
2319
+ (* DW_AT_rust_iterator: DW_FORM_flag *)
2320
+ BYTE (if iter then 1 else 0 )
2317
2321
|])
2318
2322
in
2319
2323
emit_die subprogram_die
@@ -2388,7 +2392,8 @@ let dwarf_visitor
2388
2392
(path_name() )
2389
2393
(Array. length item.node.Ast. decl_params);
2390
2394
emit_subprogram_die
2391
- id tsig.Ast. sig_output_slot taux.Ast. fn_effect
2395
+ id tsig.Ast. sig_output_slot
2396
+ taux.Ast. fn_effect taux.Ast. fn_is_iter
2392
2397
(Hashtbl. find cx.ctxt_fn_fixups item.id);
2393
2398
emit_type_param_decl_dies item.node.Ast. decl_params;
2394
2399
end
@@ -3132,9 +3137,10 @@ let rec extract_mod_items
3132
3137
let ident = get_name die in
3133
3138
let oslot = get_referenced_slot die in
3134
3139
let effect = get_effect die in
3140
+ let iter = get_flag die DW_AT_rust_iterator in
3135
3141
let (params, islots) = get_formals die in
3136
3142
let taux = { Ast. fn_effect = effect;
3137
- Ast. fn_is_iter = false }
3143
+ Ast. fn_is_iter = iter }
3138
3144
in
3139
3145
let tfn = { Ast. fn_input_slots = form_header_slots islots;
3140
3146
Ast. fn_input_constrs = [| |];
0 commit comments