Struct llvm_ir::module::Module [−][src]
Fields
name: String
The name of the module
source_file_name: String
data_layout: String
target_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: String
types: Types
Holds a reference to all of the Type
s used in the Module
, and
facilitates lookups so you can get a TypeRef
to the Type
you want.
Implementations
impl Module
[src]
pub fn type_of<T: Typed + ?Sized>(&self, t: &T) -> TypeRef
[src]
Get the type of anything that is Typed
.
pub fn get_func_by_name(&self, name: &str) -> Option<&Function>
[src]
Get the Function
having the given Name
(if any).
Note that Function
s are named with String
s and not Name
s.
pub fn from_bc_path(path: impl AsRef<Path>) -> Result<Self, String>
[src]
Parse the LLVM bitcode (.bc) file at the given path to create a Module
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Module
[src]
impl Send for Module
[src]
impl Sync for Module
[src]
impl Unpin for Module
[src]
impl UnwindSafe for Module
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,