Skip to main content

AnalysisPass

Trait AnalysisPass 

Source
pub trait AnalysisPass {
    type Result: 'static;

    // Required methods
    fn name(&self) -> &str;
    fn run(&self, func: &Function) -> Self::Result;
}
Expand description

A read-only analysis pass.

Analysis passes inspect a function without modifying it and produce a cacheable result that downstream passes can query via AnalysisManager.

Required Associated Types§

Source

type Result: 'static

The result type produced by this analysis.

Required Methods§

Source

fn name(&self) -> &str

The name of this analysis, for debugging and logging.

Source

fn run(&self, func: &Function) -> Self::Result

Computes the analysis result for the given function.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§