Return error for register mapping failure.

This commit removes a panic when a register mapping fails and instead returns
an error from creating the unwind information.
This commit is contained in:
Peter Huene
2020-04-15 14:02:26 -07:00
parent 5dba941180
commit 2fb7e9f3c2
3 changed files with 34 additions and 27 deletions

View File

@@ -12,7 +12,7 @@ type Expression = Vec<u8>;
/// Enumerate the errors possible in mapping Cranelift registers to their DWARF equivalent.
#[allow(missing_docs)]
#[derive(Error, Debug)]
#[derive(Error, Debug, PartialEq, Eq)]
pub enum RegisterMappingError {
#[error("unable to find bank for register info")]
MissingBank,