Struct llvm_ir::module::Module[][src]

pub struct Module {
    pub name: String,
    pub source_file_name: String,
    pub data_layout: DataLayout,
    pub target_triple: Option<String>,
    pub functions: Vec<Function>,
    pub global_vars: Vec<GlobalVariable>,
    pub global_aliases: Vec<GlobalAlias>,
    pub inline_assembly: String,
    pub types: Types,
}
Expand description

Fields

name: String

The name of the module

source_file_name: Stringdata_layout: DataLayouttarget_triple: Option<String>functions: Vec<Function>

Functions which are defined (not just declared) in this Module. See LLVM 12 docs on Functions

global_vars: Vec<GlobalVariable>global_aliases: Vec<GlobalAlias>inline_assembly: Stringtypes: Types

Holds a reference to all of the Types used in the Module, and facilitates lookups so you can get a TypeRef to the Type you want.

Implementations

Get the type of anything that is Typed.

Get the Function having the given Name (if any). Note that Functions are named with Strings and not Names.

Parse the LLVM bitcode (.bc) file at the given path to create a Module

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.