Skip to content

Commit 2d5853a

Browse files
committed
skip ir_value check if ir_check_ignore meta is present
1 parent bbd6124 commit 2d5853a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/validation.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ function check_ir_values(mod::LLVM.Module, T_bad::LLVMType)
322322
errors = IRError[]
323323

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

0 commit comments

Comments
 (0)