Don't generate DWARF sections when no functions were compiled. (#894)
This commit is contained in:
@@ -48,10 +48,22 @@ pub type ValueLabelsRanges = PrimaryMap<DefinedFuncIndex, cranelift_codegen::Val
|
||||
/// Stack slots for functions.
|
||||
pub type StackSlots = PrimaryMap<DefinedFuncIndex, ir::StackSlots>;
|
||||
|
||||
/// Memory definition offset in the VMContext structure.
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum ModuleMemoryOffset {
|
||||
/// Not available.
|
||||
None,
|
||||
/// Offset to the defined memory.
|
||||
Defined(u32),
|
||||
/// Offset to the imported memory.
|
||||
Imported(u32),
|
||||
}
|
||||
|
||||
/// Module `vmctx` related info.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ModuleVmctxInfo {
|
||||
/// The memory definition offset in the VMContext structure.
|
||||
pub memory_offset: i64,
|
||||
pub memory_offset: ModuleMemoryOffset,
|
||||
|
||||
/// The functions stack slots.
|
||||
pub stack_slots: StackSlots,
|
||||
|
||||
Reference in New Issue
Block a user