Skip to content

Commit

Permalink
Export 'env' functions as qualified
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonJF committed Jul 20, 2018
1 parent e62285e commit e7dc81f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/lib/ir/func.ml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,10 @@ let symbol ~module_name = function
| DefinedFunction { core_info } ->
module_name ^ "_funcinternal_" ^ (string_of_int core_info.id)
| ImportedFunction { import_info ; _ } ->
(* "env"-imported functions are treated as unqualified *)
if import_info.module_name = "env" then
import_info.function_name
(* "spectest"-imported functions are qualified, but use C conventions
(* "spectest" and "env"-imported functions use C conventions
* so must call "cfunc" version of the export *)
else if import_info.module_name = "spectest" then
if import_info.module_name = "spectest"
|| import_info.module_name = "env" then
import_info.module_name ^ "_cfunc_" ^ import_info.function_name
else
import_info.module_name ^ "_func_" ^ import_info.function_name
Expand Down

0 comments on commit e7dc81f

Please sign in to comment.