pub struct CallGraphInfo<'tcx> {
pub functions: HashMap<usize, Node>,
pub fn_calls: HashMap<usize, Vec<(usize, &'tcx Terminator<'tcx>)>>,
pub node_registry: HashMap<String, usize>,
}
Fields§
§functions: HashMap<usize, Node>
§fn_calls: HashMap<usize, Vec<(usize, &'tcx Terminator<'tcx>)>>
§node_registry: HashMap<String, usize>
Implementations§
Source§impl<'tcx> CallGraphInfo<'tcx>
impl<'tcx> CallGraphInfo<'tcx>
pub fn new() -> Self
pub fn get_node_num(&self) -> usize
pub fn get_callees_path( &self, caller_def_path: &String, ) -> Option<HashSet<String>>
pub fn add_node(&mut self, def_id: DefId, def_path: &String)
pub fn add_funciton_call_edge( &mut self, caller_id: usize, callee_id: usize, terminator_stmt: &'tcx Terminator<'tcx>, )
pub fn get_node_by_path(&self, def_path: &String) -> Option<usize>
pub fn get_callers_map( &self, ) -> HashMap<usize, Vec<(usize, &'tcx Terminator<'tcx>)>>
pub fn display(&self)
pub fn get_reverse_post_order(&self) -> Vec<DefId>
Auto Trait Implementations§
impl<'tcx> Freeze for CallGraphInfo<'tcx>
impl<'tcx> !RefUnwindSafe for CallGraphInfo<'tcx>
impl<'tcx> Send for CallGraphInfo<'tcx>
impl<'tcx> Sync for CallGraphInfo<'tcx>
impl<'tcx> Unpin for CallGraphInfo<'tcx>
impl<'tcx> !UnwindSafe for CallGraphInfo<'tcx>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more