Implement serde and equality traits for SecondaryMap

This commit is contained in:
Artur Jamro
2019-08-22 10:11:41 -07:00
committed by Dan Gohman
parent e736367b8c
commit d3815a0399
5 changed files with 112 additions and 17 deletions

View File

@@ -101,7 +101,7 @@ impl fmt::Display for StackSlotKind {
}
/// Contents of a stack slot.
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq, Eq)]
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
pub struct StackSlotData {
/// The kind of stack slot.
@@ -154,7 +154,7 @@ impl fmt::Display for StackSlotData {
/// Stack frame manager.
///
/// Keep track of all the stack slots used by a function.
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq, Eq)]
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
pub struct StackSlots {
/// All allocated stack slots.