Struct cranelift_module::ModuleDeclarations [−][src]
pub struct ModuleDeclarations { /* fields omitted */ }Expand description
This provides a view to the state of a module which allows ir::ExternalNames to be translated
into FunctionDeclarations and DataDeclarations.
Implementations
impl ModuleDeclarations[src]
impl ModuleDeclarations[src]pub fn get_name(&self, name: &str) -> Option<FuncOrDataId>[src]
pub fn get_name(&self, name: &str) -> Option<FuncOrDataId>[src]Get the module identifier for a given name, if that name has been declared.
pub fn get_functions(
&self
) -> impl Iterator<Item = (FuncId, &FunctionDeclaration)>[src]
pub fn get_functions(
&self
) -> impl Iterator<Item = (FuncId, &FunctionDeclaration)>[src]Get an iterator of all function declarations
pub fn is_function(name: &ExternalName) -> bool[src]
pub fn is_function(name: &ExternalName) -> bool[src]Return whether name names a function, rather than a data object.
pub fn get_function_decl(&self, func_id: FuncId) -> &FunctionDeclaration[src]
pub fn get_function_decl(&self, func_id: FuncId) -> &FunctionDeclaration[src]Get the FunctionDeclaration for the function named by name.
pub fn get_data_objects(
&self
) -> impl Iterator<Item = (DataId, &DataDeclaration)>[src]
pub fn get_data_objects(
&self
) -> impl Iterator<Item = (DataId, &DataDeclaration)>[src]Get an iterator of all data declarations
pub fn get_data_decl(&self, data_id: DataId) -> &DataDeclaration[src]
pub fn get_data_decl(&self, data_id: DataId) -> &DataDeclaration[src]Get the DataDeclaration for the data object named by name.
pub fn declare_function(
&mut self,
name: &str,
linkage: Linkage,
signature: &Signature
) -> ModuleResult<(FuncId, &FunctionDeclaration)>[src]
pub fn declare_function(
&mut self,
name: &str,
linkage: Linkage,
signature: &Signature
) -> ModuleResult<(FuncId, &FunctionDeclaration)>[src]Declare a function in this module.
pub fn declare_data(
&mut self,
name: &str,
linkage: Linkage,
writable: bool,
tls: bool
) -> ModuleResult<(DataId, &DataDeclaration)>[src]
pub fn declare_data(
&mut self,
name: &str,
linkage: Linkage,
writable: bool,
tls: bool
) -> ModuleResult<(DataId, &DataDeclaration)>[src]Declare a data object in this module.
Trait Implementations
impl Debug for ModuleDeclarations[src]
impl Debug for ModuleDeclarations[src]impl Default for ModuleDeclarations[src]
impl Default for ModuleDeclarations[src]fn default() -> ModuleDeclarations[src]
fn default() -> ModuleDeclarations[src]Returns the “default value” for a type. Read more