pub struct Module {
pub types: Vec<Type>,
pub values: Vec<Value>,
pub value_types: Vec<TypeId>,
pub names: Vec<(ValueId, String)>,
pub metadata: Vec<Metadata>,
pub metadata_at: Vec<usize>,
pub named_metadata: Vec<(String, Vec<MetadataId>)>,
pub named_metadata_at: Vec<usize>,
pub at: usize,
pub functions: Vec<Function>,
pub precise_kind: Option<u64>,
}Expand description
A module: its types, values, metadata and function bodies.
Fields§
§types: Vec<Type>The type table.
values: Vec<Value>The module’s values by id (globals, functions, module constants); a function body’s own values continue the
numbering in its Function.
value_types: Vec<TypeId>Each value’s type.
names: Vec<(ValueId, String)>The symbol table: the name of the values that have one.
metadata: Vec<Metadata>The metadata records, by MetadataId.
metadata_at: Vec<usize>The bit of the bitcode each metadata record (by id) starts at, for the locations of reflection errors.
named_metadata: Vec<(String, Vec<MetadataId>)>The named metadata (dx.entryPoints, …): the name and the records it lists.
named_metadata_at: Vec<usize>The bit each named metadata record (by index in named_metadata) starts at.
at: usizeThe bit of the bitcode the module block starts at: where a record the module lacks would be.
functions: Vec<Function>The function bodies, in the order of their definitions.
precise_kind: Option<u64>The id of the module’s dx.precise metadata kind (the kind Instruction::precise reads), where it names one.