Trait llvm_plugin::LlvmModulePass
source · pub trait LlvmModulePass {
// Required method
fn run_pass(
&self,
module: &mut Module<'_>,
manager: &ModuleAnalysisManager
) -> PreservedAnalyses;
}
Expand description
Trait to use for implementing a transformation pass on an LLVM module.
A transformation pass is allowed to mutate the LLVM IR.
Required Methods§
sourcefn run_pass(
&self,
module: &mut Module<'_>,
manager: &ModuleAnalysisManager
) -> PreservedAnalyses
fn run_pass( &self, module: &mut Module<'_>, manager: &ModuleAnalysisManager ) -> PreservedAnalyses
Entrypoint for the pass.
The given analysis manager allows the pass to query the pass manager for the result of specific analysis passes.
If this function makes modifications on the given module IR, it
should return PreservedAnalyses::None
to indicate to the
pass manager that all analyses are now invalidated.