Add serde serialization support for the full clif ir

This commit is contained in:
bjorn3
2020-12-19 16:32:46 +01:00
parent 7b4652bb82
commit 2fc964ea35
25 changed files with 195 additions and 4 deletions

View File

@@ -2,6 +2,9 @@
use core::fmt;
#[cfg(feature = "enable-serde")]
use serde::{Deserialize, Serialize};
enum FlagBit {
Notrap,
Aligned,
@@ -32,6 +35,7 @@ pub enum Endianness {
/// be overridden for individual accesses by explicitly specifying little- or big-endian
/// semantics via the flags.
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
pub struct MemFlags {
bits: u8,
}