@@ -25,7 +25,7 @@ mod x86;
25
25
mod x86_64;
26
26
mod x86_win64;
27
27
28
- #[ derive( Clone , Copy , PartialEq , Eq , Debug ) ]
28
+ #[ derive( Clone , Copy , PartialEq , Eq , Hash , Debug , HashStable_Generic ) ]
29
29
pub enum PassMode {
30
30
/// Ignore the argument.
31
31
///
@@ -60,7 +60,7 @@ pub use attr_impl::ArgAttribute;
60
60
mod attr_impl {
61
61
// The subset of llvm::Attribute needed for arguments, packed into a bitfield.
62
62
bitflags:: bitflags! {
63
- #[ derive( Default ) ]
63
+ #[ derive( Default , HashStable_Generic ) ]
64
64
pub struct ArgAttribute : u16 {
65
65
const NoAlias = 1 << 1 ;
66
66
const NoCapture = 1 << 2 ;
@@ -77,7 +77,7 @@ mod attr_impl {
77
77
/// Sometimes an ABI requires small integers to be extended to a full or partial register. This enum
78
78
/// defines if this extension should be zero-extension or sign-extension when necessary. When it is
79
79
/// 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 ) ]
81
81
pub enum ArgExtension {
82
82
None ,
83
83
Zext ,
@@ -86,7 +86,7 @@ pub enum ArgExtension {
86
86
87
87
/// A compact representation of LLVM attributes (at least those relevant for this module)
88
88
/// 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 ) ]
90
90
pub struct ArgAttributes {
91
91
pub regular : ArgAttribute ,
92
92
pub arg_ext : ArgExtension ,
@@ -127,14 +127,14 @@ impl ArgAttributes {
127
127
}
128
128
}
129
129
130
- #[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
130
+ #[ derive( Copy , Clone , PartialEq , Eq , Hash , Debug , HashStable_Generic ) ]
131
131
pub enum RegKind {
132
132
Integer ,
133
133
Float ,
134
134
Vector ,
135
135
}
136
136
137
- #[ derive( Copy , Clone , PartialEq , Eq , Debug ) ]
137
+ #[ derive( Copy , Clone , PartialEq , Eq , Hash , Debug , HashStable_Generic ) ]
138
138
pub struct Reg {
139
139
pub kind : RegKind ,
140
140
pub size : Size ,
@@ -184,7 +184,7 @@ impl Reg {
184
184
185
185
/// An argument passed entirely registers with the
186
186
/// 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 ) ]
188
188
pub struct Uniform {
189
189
pub unit : Reg ,
190
190
@@ -209,7 +209,7 @@ impl Uniform {
209
209
}
210
210
}
211
211
212
- #[ derive( Clone , Copy , PartialEq , Eq , Debug ) ]
212
+ #[ derive( Clone , Copy , PartialEq , Eq , Hash , Debug , HashStable_Generic ) ]
213
213
pub struct CastTarget {
214
214
pub prefix : [ Option < RegKind > ; 8 ] ,
215
215
pub prefix_chunk_size : Size ,
@@ -437,7 +437,7 @@ impl<'a, Ty> TyAndLayout<'a, Ty> {
437
437
438
438
/// Information about how to pass an argument to,
439
439
/// or return a value from, a function, under some ABI.
440
- #[ derive( Debug ) ]
440
+ #[ derive( PartialEq , Eq , Hash , Debug , HashStable_Generic ) ]
441
441
pub struct ArgAbi < ' a , Ty > {
442
442
pub layout : TyAndLayout < ' a , Ty > ,
443
443
@@ -545,7 +545,7 @@ impl<'a, Ty> ArgAbi<'a, Ty> {
545
545
}
546
546
}
547
547
548
- #[ derive( Copy , Clone , PartialEq , Debug ) ]
548
+ #[ derive( Copy , Clone , PartialEq , Eq , Hash , Debug , HashStable_Generic ) ]
549
549
pub enum Conv {
550
550
// General language calling conventions, for which every target
551
551
// should have its own backend (e.g. LLVM) support.
@@ -579,7 +579,7 @@ pub enum Conv {
579
579
///
580
580
/// I will do my best to describe this structure, but these
581
581
/// comments are reverse-engineered and may be inaccurate. -NDM
582
- #[ derive( Debug ) ]
582
+ #[ derive( PartialEq , Eq , Hash , Debug , HashStable_Generic ) ]
583
583
pub struct FnAbi < ' a , Ty > {
584
584
/// The LLVM types of each argument.
585
585
pub args : Vec < ArgAbi < ' a , Ty > > ,
0 commit comments