Remove the debug crate's hard-coded dependency on register ordering
This commit is contained in:
@@ -64,6 +64,7 @@ use crate::timing;
|
||||
use alloc::borrow::Cow;
|
||||
use alloc::boxed::Box;
|
||||
use core::fmt;
|
||||
use core::fmt::{Debug, Formatter};
|
||||
use target_lexicon::{triple, Architecture, PointerWidth, Triple};
|
||||
use thiserror::Error;
|
||||
|
||||
@@ -390,3 +391,14 @@ pub trait TargetIsa: fmt::Display + Send + Sync {
|
||||
// No-op by default
|
||||
}
|
||||
}
|
||||
|
||||
impl Debug for &dyn TargetIsa {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
|
||||
write!(
|
||||
f,
|
||||
"TargetIsa {{ triple: {:?}, pointer_width: {:?}}}",
|
||||
self.triple(),
|
||||
self.pointer_width()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user