[][src]Struct llvm_ir_analysis::CrossModuleAnalysis

pub struct CrossModuleAnalysis<'m> { /* fields omitted */ }

Analyzes multiple Modules, providing a ModuleAnalysis for each; and also provides a few additional cross-module analyses (e.g., a cross-module call graph)

Implementations

impl<'m> CrossModuleAnalysis<'m>[src]

pub fn new(modules: impl IntoIterator<Item = &'m Module>) -> Self[src]

Create a new CrossModuleAnalysis for the given set of Modules.

This method itself is cheap; individual analyses will be computed lazily on demand.

pub fn modules<'s>(&'s self) -> impl Iterator<Item = &'m Module> + 's[src]

Iterate over the analyzed Module(s).

pub fn functions<'s>(&'s self) -> impl Iterator<Item = &'m Function> + 's[src]

Iterate over all the Functions in the analyzed Module(s).

pub fn call_graph(&self) -> Ref<'_, CallGraph<'m>>[src]

Get the full CallGraph for the Module(s).

This will include both cross-module and within-module calls.

pub fn functions_by_type(&self) -> Ref<'_, FunctionsByType<'m>>[src]

Get the FunctionsByType for the Module(s).

pub fn module_analysis<'s>(&'s self, mod_name: &str) -> &'s ModuleAnalysis<'m>[src]

Get the ModuleAnalysis for the module with the given name.

Panics if no module of that name exists in the Module(s) which the CrossModuleAnalysis was created with.

pub fn get_func_by_name(
    &self,
    func_name: &str
) -> Option<(&'m Function, &'m Module)>
[src]

Get the Function with the given name from the analyzed Module(s).

Returns both the Function and the Module it was found in, or None if no function was found with that name.

Auto Trait Implementations

impl<'m> !RefUnwindSafe for CrossModuleAnalysis<'m>

impl<'m> Send for CrossModuleAnalysis<'m>

impl<'m> !Sync for CrossModuleAnalysis<'m>

impl<'m> Unpin for CrossModuleAnalysis<'m>

impl<'m> UnwindSafe for CrossModuleAnalysis<'m>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.