Skip to content

Commit

Permalink
skip ir_value check if ir_check_ignore meta is present
Browse files Browse the repository at this point in the history
  • Loading branch information
tgymnich committed Sep 17, 2024
1 parent bbd6124 commit 2d5853a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/validation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,8 @@ function check_ir_values(mod::LLVM.Module, T_bad::LLVMType)
errors = IRError[]

for fun in functions(mod), bb in blocks(fun), inst in instructions(bb)
if value_type(inst) == T_bad || any(param->value_type(param) == T_bad, operands(inst))
if value_type(inst) == T_bad && !haskey(metadata(inst), "ir_check_ignore") ||
any(op -> value_type(op) == T_bad && !(op isa Instruction && haskey("ir_check_ignore", metadata(op))), operands(inst))
bt = backtrace(inst)
push!(errors, ("use of $(string(T_bad)) value", bt, inst))
end
Expand Down

0 comments on commit 2d5853a

Please sign in to comment.