Macro cranelift_codegen::verify[][src]

macro_rules! verify {
    ( $verifier: expr; $fun: ident $(, $arg: expr )* ) => { ... };
    ( $fun: path, $(, $arg: expr )* ) => { ... };
}

Shorthand syntax for calling functions of the form verify_foo(a, b, &mut VerifierErrors) -> VerifierStepResult<T> as if they had the form verify_foo(a, b) -> VerifierResult<T>.

This syntax also ensures that no errors whatsoever were reported, even if they were not fatal.

Example

This example is not tested
verify!(verify_context, func, cfg, domtree, fisa)

// ... is equivalent to...

let mut errors = VerifierErrors::new();
let result = verify_context(func, cfg, domtree, fisa, &mut errors);

if errors.is_empty() {
    Ok(result.unwrap())
} else {
    Err(errors)
}