cranelift_module/traps.rs
1//! Defines `TrapSite`.
2
3use cranelift_codegen::{binemit, ir};
4
5/// Record of the arguments cranelift passes to `TrapSink::trap`.
6#[derive(Clone, Debug)]
7pub struct TrapSite {
8 /// Offset into function.
9 pub offset: binemit::CodeOffset,
10 /// Source location given to cranelift.
11 pub srcloc: ir::SourceLoc,
12 /// Trap code, as determined by cranelift.
13 pub code: ir::TrapCode,
14}