File tree 2 files changed +7
-8
lines changed
2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ type ctxt =
169
169
ctxt_required_lib_num : (required_lib , int ) Hashtbl .t ;
170
170
171
171
ctxt_main_fn_fixup : fixup option ;
172
- ctxt_main_name : string option ;
172
+ ctxt_main_name : Ast .name option ;
173
173
}
174
174
;;
175
175
@@ -254,10 +254,7 @@ let new_ctxt sess abi crate =
254
254
None -> None
255
255
| Some n -> Some (new_fixup (string_of_name n)));
256
256
257
- ctxt_main_name =
258
- (match crate.Ast. crate_main with
259
- None -> None
260
- | Some n -> Some (string_of_name n));
257
+ ctxt_main_name = crate.Ast. crate_main;
261
258
}
262
259
;;
263
260
Original file line number Diff line number Diff line change @@ -5313,7 +5313,7 @@ let fixup_assigning_visitor
5313
5313
5314
5314
| Ast. MOD_ITEM_fn _ ->
5315
5315
begin
5316
- let path = path_name () in
5316
+ let path = path_to_name path in
5317
5317
let fixup =
5318
5318
if (not cx.ctxt_sess.Session. sess_library_mode)
5319
5319
&& (Some path) = cx.ctxt_main_name
@@ -5322,7 +5322,7 @@ let fixup_assigning_visitor
5322
5322
None -> bug () " missing main fixup in trans"
5323
5323
| Some fix -> fix
5324
5324
else
5325
- new_fixup path
5325
+ new_fixup (path_name () )
5326
5326
in
5327
5327
htab_put cx.ctxt_fn_fixups i.id fixup;
5328
5328
end
@@ -5390,7 +5390,9 @@ let process_crate
5390
5390
begin
5391
5391
match cx.ctxt_main_name with
5392
5392
None -> ()
5393
- | Some m -> log cx " with main fn %s" m
5393
+ | Some m ->
5394
+ log cx " with main fn %a"
5395
+ Ast. sprintf_name m
5394
5396
end ;
5395
5397
run_passes cx " trans" path passes
5396
5398
cx.ctxt_sess.Session. sess_log_trans log crate;
You can’t perform that action at this time.
0 commit comments