Skip to main content

FunctionPass

Trait FunctionPass 

Source
pub trait FunctionPass {
    // Required methods
    fn run_on_function(
        &mut self,
        ctx: &mut Context,
        func: &mut Function,
    ) -> bool;
    fn name(&self) -> &'static str;
}
Expand description

A pass that transforms a single function.

Required Methods§

Source

fn run_on_function(&mut self, ctx: &mut Context, func: &mut Function) -> bool

Apply this pass to func. Returns true if the IR was modified.

Source

fn name(&self) -> &'static str

Human-readable name used in diagnostics.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§