Skip to content

Commit a28e17b

Browse files
committed
binding
1 parent 93b8c1a commit a28e17b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/compiler/validation.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,11 @@ function check_ir!(interp, @nospecialize(job::CompilerJob), errors::Vector{IRErr
267267
ptr = Base.unsafe_load(ptr)
268268
end
269269
obj = Base.unsafe_pointer_to_objref(ptr)
270+
271+
# TODO we can use this to make it properly relocatable
272+
if isa(obj, Core.Binding)
273+
obj = obj.value
274+
end
270275

271276
b = IRBuilder()
272277
position!(b, inst)
@@ -832,8 +837,6 @@ function check_ir!(interp, @nospecialize(job::CompilerJob), errors::Vector{IRErr
832837
end
833838
if isa(flib, GlobalRef) && isdefined(flib.mod, flib.name)
834839
flib = getfield(flib.mod, flib.name)
835-
elseif isa(flib, Core.Binding)
836-
flib = flib.value
837840
end
838841

839842
fname = LLVM.Value(LLVM.LLVM.API.LLVMGetOperand(inst, 1))

0 commit comments

Comments
 (0)