luaur_analysis/methods/cfg_builder_new_definition.rs
1use crate::records::cfg_allocator::CfgAllocator;
2use crate::records::cfg_builder::CfgBuilder;
3use crate::records::symbol::Symbol;
4use crate::type_aliases::def_id_control_flow_graph::DefId;
5
6impl CfgBuilder {
7 pub fn new_definition(&mut self, sym: Symbol) -> DefId {
8 let version = self.next_version_index(sym.clone());
9 let allocator = unsafe { &mut *self.allocator };
10 allocator.new_definition(sym, version)
11 }
12}