You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: compiler/section_mangler/src/lib.rs
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -49,20 +49,20 @@ mod parser;
49
49
/// The main builder type of this crate. Use it to create mangling contexts, in
50
50
/// order to encode and decode binary type information.
51
51
// TODO: Add example code for using this builder
52
-
#[derive(Debug,PartialEq)]
52
+
#[derive(Debug,PartialEq,Clone)]
53
53
pubenumSectionMangler{
54
54
Function(FunctionMangler),
55
55
Variable(VariableMangler),
56
56
}
57
57
58
-
#[derive(Debug,PartialEq)]
58
+
#[derive(Debug,PartialEq,Clone)]
59
59
pubstructFunctionMangler{
60
60
name:String,
61
61
parameters:Vec<FunctionArgument>,
62
62
return_type:Option<Type>,
63
63
}
64
64
65
-
#[derive(Debug,PartialEq)]
65
+
#[derive(Debug,PartialEq,Clone)]
66
66
pubstructVariableMangler{
67
67
name:String,
68
68
ty:Type,
@@ -116,7 +116,7 @@ impl SectionMangler {
116
116
// NOTE: This is called `variable_linkage` in the `MemberInfo` struct.
117
117
118
118
/// We have to encode this because if it changes, the function needs to be reloaded - this is an ABI breakage
119
-
#[derive(Debug,PartialEq)]
119
+
#[derive(Debug,PartialEq,Clone)]
120
120
pubenumFunctionArgument{
121
121
ByValue(Type),
122
122
ByRef(Type),
@@ -133,7 +133,7 @@ impl fmt::Display for FunctionArgument {
133
133
}
134
134
135
135
// TODO: Do we have to encode this? Does that affect ABI? Probably
136
-
#[derive(Debug,PartialEq)]
136
+
#[derive(Debug,PartialEq,Clone)]
137
137
pubenumStringEncoding{
138
138
// TODO: Should we encode this differently? this could cause problems compared to encoding unsigned types
139
139
/// Encoded as `8u`
@@ -153,7 +153,7 @@ impl fmt::Display for StringEncoding {
153
153
154
154
// This maps directly to the [`DataTypeInformation`] enum in RuSTy - we simply remove some fields and add the ability to encode/decode serialize/deserialize
0 commit comments