Skip to main content

luaur_code_gen/functions/
any_argument_match.rs

1use crate::records::ir_inst::IrInst;
2use crate::records::ir_op::IrOp;
3
4pub fn any_argument_match<F>(inst: &IrInst, mut func: F) -> bool
5where
6    F: FnMut(&IrOp) -> bool,
7{
8    if crate::functions::is_pseudo::is_pseudo(inst.cmd) {
9        return false;
10    }
11
12    for op in &inst.ops {
13        if func(op) {
14            return true;
15        }
16    }
17    false
18}