Struct llvm_plugin::ModuleAnalysisManager
source · [−]pub struct ModuleAnalysisManager { /* private fields */ }
Expand description
Struct allowing to query the pass manager for the result of analyses on module IR.
Implementations
sourceimpl ModuleAnalysisManager
impl ModuleAnalysisManager
sourcepub fn get_result<'a, A>(&self, module: &Module<'a>) -> &A::Resultwhere
A: LlvmModuleAnalysis,
pub fn get_result<'a, A>(&self, module: &Module<'a>) -> &A::Resultwhere
A: LlvmModuleAnalysis,
Returns the result of the analysis on a given module IR.
If the result is not in cache, the pass manager will execute the analysis pass. Otherwise, the result is directly returned from cache.
Panics
Panics if the given analysis wasn’t registered (happens if the #[analysis]
attribute wasn’t used), or if this function was called within the given analysis
itself.
sourcepub fn get_cached_result<'a, A>(&self, module: &Module<'a>) -> Option<&A::Result>where
A: LlvmModuleAnalysis,
pub fn get_cached_result<'a, A>(&self, module: &Module<'a>) -> Option<&A::Result>where
A: LlvmModuleAnalysis,
Returns the result of the analysis on a given module IR.
If the result is not in cache, None
is returned. Otherwise,
the result is directly returned from cache.
This function never triggers the execution of an analysis.
Panics
Panics if the given analysis wasn’t registered (happens if the #[analysis]
attribute wasn’t used), or if this function was called within the given analysis
itself.
sourcepub fn get_function_analysis_manager_proxy<'a>(
&self,
module: &Module<'a>
) -> FunctionAnalysisManagerProxy
pub fn get_function_analysis_manager_proxy<'a>(
&self,
module: &Module<'a>
) -> FunctionAnalysisManagerProxy
Returns a FunctionAnalysisManagerProxy
, which is essentially an interface
allowing management of analyses at the function level.
Auto Trait Implementations
impl RefUnwindSafe for ModuleAnalysisManager
impl !Send for ModuleAnalysisManager
impl !Sync for ModuleAnalysisManager
impl Unpin for ModuleAnalysisManager
impl UnwindSafe for ModuleAnalysisManager
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more