pub fn create_external<'c, T: RunExternalPass<'c>>(
    pass: T,
    pass_id: TypeId<'_>,
    name: &str,
    argument: &str,
    description: &str,
    op_name: &str,
    dependent_dialects: &[DialectHandle]
) -> Pass
Expand description

Creates a Pass object from an external pass

§Examples

use melior::{
    Context,
    ir::{r#type::TypeId, OperationRef},
    pass::{create_external, ExternalPass},
};

#[repr(align(8))]
struct PassId;

static EXAMPLE_PASS: PassId = PassId;

let context = Context::new();

create_external(
    |operation: OperationRef, _pass: ExternalPass| {
        operation.dump();
    },
    TypeId::create(&EXAMPLE_PASS),
    "name",
    "argument",
    "description",
    "",
    &[],
);