Skip to content

Commit 1996ba2

Browse files
committed
Set Flambda2 current compilation unit too
1 parent c8b6821 commit 1996ba2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

middle_end/compilenv.ml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,14 @@ let reset ?packname name =
141141
(Ident.create_persistent name)
142142
(current_unit_linkage_name ())
143143
in
144+
Compilation_unit.set_current compilation_unit;
145+
let module Compilation_unit = Flambda2_compilenv_deps.Compilation_unit in
146+
let module Linkage_name = Flambda2_compilenv_deps.Linkage_name in
147+
let compilation_unit =
148+
Compilation_unit.create
149+
(Ident.create_persistent name)
150+
(Linkage_name.create (make_symbol ~unitname:current_unit.ui_symbol None))
151+
in
144152
Compilation_unit.set_current compilation_unit
145153

146154
let current_unit_infos () =

0 commit comments

Comments
 (0)