Skip to content

Commit

Permalink
Update validation.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Dec 31, 2024
1 parent bfa1fe5 commit b286344
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/compiler/validation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,9 @@ function check_ir!(@nospecialize(job::CompilerJob), errors::Vector{IRError}, imp
end
end
@assert FT !== nothing

initfn, _ = get_base_and_offset(LLVM.initializer(fn_got); offsetAllowed=false, inttoptr=false)
init = LLVM.initializer(fn_got)
if init !== nothing
initfn, _ = get_base_and_offset(init; offsetAllowed=false, inttoptr=false)
loadfn = first(instructions(first(blocks(initfn))))::LLVM.LoadInst
opv = operands(loadfn)[1]
if !isa(opv, LLVM.GlobalVariable)
Expand Down Expand Up @@ -433,6 +434,7 @@ function check_ir!(@nospecialize(job::CompilerJob), errors::Vector{IRError}, imp
LLVM.API.LLVMDeleteGlobal(fn_got)
end
end
end

elseif isInline
md = metadata(inst)
Expand Down

0 comments on commit b286344

Please sign in to comment.