We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
llvmcall
1 parent d66c5b9 commit 82e3897Copy full SHA for 82e3897
src/optimize.jl
@@ -15,12 +15,16 @@ function lookup_stmt(stmts::Vector{Any}, @nospecialize arg)
15
# :(Base.getproperty(%1, :Intrinsics))
16
# :(Base.getproperty(%2, :llvmcall))
17
q = arg.args[3]
18
- if isa(q, QuoteNode) && isa(q.value, Symbol)
+ if isa(q, QuoteNode) && (qval = q.value; qval isa Symbol)
19
mod = lookup_stmt(stmts, arg.args[2])
20
if isa(mod, GlobalRef)
21
mod = @invokelatest getglobal(mod.mod, mod.name)
22
end
23
- isa(mod, Module) && return @invokelatest getglobal(mod, q.value)
+ if isa(mod, Module)
24
+ if @invokelatest isdefinedglobal(mod, qval)
25
+ return @invokelatest getglobal(mod, qval)
26
+ end
27
28
29
30
return arg
0 commit comments