@@ -25,7 +25,7 @@ mod x86;
2525mod x86_64;
2626mod x86_win64;
2727
28- #[ derive( Clone , Copy , PartialEq , Eq , Debug ) ]
28+ #[ derive( Clone , Copy , PartialEq , Eq , Hash , Debug , HashStable_Generic ) ]
2929pub enum PassMode {
3030 /// Ignore the argument.
3131 ///
@@ -60,7 +60,7 @@ pub use attr_impl::ArgAttribute;
6060mod attr_impl {
6161 // The subset of llvm::Attribute needed for arguments, packed into a bitfield.
6262 bitflags:: bitflags! {
63- #[ derive( Default ) ]
63+ #[ derive( Default , HashStable_Generic ) ]
6464 pub struct ArgAttribute : u16 {
6565 const NoAlias = 1 << 1 ;
6666 const NoCapture = 1 << 2 ;
@@ -77,7 +77,7 @@ mod attr_impl {
7777/// Sometimes an ABI requires small integers to be extended to a full or partial register. This enum
7878/// defines if this extension should be zero-extension or sign-extension when necessary. When it is
7979/// not necessary to extend the argument, this enum is ignored.
80- #[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
80+ #[ derive( Copy , Clone , PartialEq , Eq , Hash , Debug , HashStable_Generic ) ]
8181pub enum ArgExtension {
8282 None ,
8383 Zext ,
@@ -86,7 +86,7 @@ pub enum ArgExtension {
8686
8787/// A compact representation of LLVM attributes (at least those relevant for this module)
8888/// that can be manipulated without interacting with LLVM's Attribute machinery.
89- #[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
89+ #[ derive( Copy , Clone , PartialEq , Eq , Hash , Debug , HashStable_Generic ) ]
9090pub struct ArgAttributes {
9191 pub regular : ArgAttribute ,
9292 pub arg_ext : ArgExtension ,
@@ -127,14 +127,14 @@ impl ArgAttributes {
127127 }
128128}
129129
130- #[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
130+ #[ derive( Copy , Clone , PartialEq , Eq , Hash , Debug , HashStable_Generic ) ]
131131pub enum RegKind {
132132 Integer ,
133133 Float ,
134134 Vector ,
135135}
136136
137- #[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
137+ #[ derive( Copy , Clone , PartialEq , Eq , Hash , Debug , HashStable_Generic ) ]
138138pub struct Reg {
139139 pub kind : RegKind ,
140140 pub size : Size ,
@@ -184,7 +184,7 @@ impl Reg {
184184
185185/// An argument passed entirely registers with the
186186/// same kind (e.g., HFA / HVA on PPC64 and AArch64).
187- #[ derive( Clone , Copy , PartialEq , Eq , Debug ) ]
187+ #[ derive( Clone , Copy , PartialEq , Eq , Hash , Debug , HashStable_Generic ) ]
188188pub struct Uniform {
189189 pub unit : Reg ,
190190
@@ -209,7 +209,7 @@ impl Uniform {
209209 }
210210}
211211
212- #[ derive( Clone , Copy , PartialEq , Eq , Debug ) ]
212+ #[ derive( Clone , Copy , PartialEq , Eq , Hash , Debug , HashStable_Generic ) ]
213213pub struct CastTarget {
214214 pub prefix : [ Option < RegKind > ; 8 ] ,
215215 pub prefix_chunk_size : Size ,
@@ -437,7 +437,7 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
437437
438438/// Information about how to pass an argument to,
439439/// or return a value from, a function, under some ABI.
440- #[ derive( Debug ) ]
440+ #[ derive( PartialEq , Eq , Hash , Debug , HashStable_Generic ) ]
441441pub struct ArgAbi < ' a , Ty > {
442442 pub layout : TyAndLayout < ' a , Ty > ,
443443
@@ -545,7 +545,7 @@ impl<'a, Ty> ArgAbi<'a, Ty> {
545545 }
546546}
547547
548- #[ derive( Copy , Clone , PartialEq , Debug ) ]
548+ #[ derive( Copy , Clone , PartialEq , Eq , Hash , Debug , HashStable_Generic ) ]
549549pub enum Conv {
550550 // General language calling conventions, for which every target
551551 // should have its own backend (e.g. LLVM) support.
@@ -579,7 +579,7 @@ pub enum Conv {
579579///
580580/// I will do my best to describe this structure, but these
581581/// comments are reverse-engineered and may be inaccurate. -NDM
582- #[ derive( Debug ) ]
582+ #[ derive( PartialEq , Eq , Hash , Debug , HashStable_Generic ) ]
583583pub struct FnAbi < ' a , Ty > {
584584 /// The LLVM types of each argument.
585585 pub args : Vec < ArgAbi < ' a , Ty > > ,
0 commit comments