@@ -46,35 +46,7 @@ function absolute_symbol_materialization(name, ptr)
4646 return LLVM. absolute_symbols (Ref (gv))
4747end
4848
49- const hnd_string_map = Dict {String,Ref{Ptr{Cvoid}}} ()
50-
51- # These are special (external or private) global
52- # constants that should not be incremented (renamed)
53- const global_var_prefixes = (" ejl_enz_" , " ejl_jl_" , " enz_exception" , " _j_const_" , " jl_" , " _j_str" )
54-
55- # store non-special external global constants
56- # They will be incremented to produce new names
57- const glob_vars_maps = Dict {String,Int} ()
58-
59- # TODO : may not be necessary once the core
60- # issue is found regarding linkage type of
61- # private constants is change to external
62- # when ccall is used.
63- function rename_global! (glob_var)
64- _name = LLVM. name (glob_var)
65- if any (startswith .(_name, global_var_prefixes))
66- else
67- if haskey (glob_vars_maps, _name)
68- glob_vars_maps[_name] += 1
69- _new_name = _name * " .$(glob_vars_maps[_name]) "
70- LLVM. name! (glob_var, _new_name)
71- glob_vars_maps[_new_name] = 1
72- else
73- glob_vars_maps[_name] = 1
74- end
75-
76- end
77- end
49+ const hnd_string_map = Dict {String, Ref{Ptr{Cvoid}}} ()
7850
7951function fix_ptr_lookup (name)
8052 if startswith (name, " ejlstr\$ " ) || startswith (name, " ejlptr\$ " )
@@ -286,13 +258,6 @@ function add!(mod)
286258 replace_uses! (f, ptr)
287259 Compiler. eraseInst (mod, f)
288260 end
289-
290- # rename non-special global constants that
291- # have external linkage (modified by the ccall
292- # execution path)
293- for glob_var in collect (globals (mod))
294- rename_global! (glob_var)
295- end
296261 lljit = jit[]. jit
297262 jd = LLVM. JITDylib (lljit)
298263 tsm = move_to_threadsafe (mod)
0 commit comments