diff options
author | Weston Carvalho <westoncarvalho@google.com> | 2020-12-14 13:39:57 -0800 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2020-12-15 17:27:25 +0100 |
commit | 112c69129163ea3139de019328cd8e4b837e530f (patch) | |
tree | e2c072e1b790a3296f9ab9cd032b23b7dd7f4047 | |
parent | caec44a0b4360548eea1523dd5503526631594bb (diff) |
Remove unsued mutable field logic.
-rw-r--r-- | src/ir/comp.rs | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/src/ir/comp.rs b/src/ir/comp.rs index 1d257d20..645f6251 100644 --- a/src/ir/comp.rs +++ b/src/ir/comp.rs @@ -148,9 +148,6 @@ pub trait FieldMethods { /// If this is a bitfield, how many bits does it need? fn bitfield_width(&self) -> Option<u32>; - /// Is this field marked as `mutable`? - fn is_mutable(&self) -> bool; - /// Get the annotations for this field. fn annotations(&self) -> &Annotations; @@ -415,10 +412,6 @@ impl FieldMethods for Bitfield { self.data.bitfield_width() } - fn is_mutable(&self) -> bool { - self.data.is_mutable() - } - fn annotations(&self) -> &Annotations { self.data.annotations() } @@ -443,7 +436,6 @@ impl RawField { comment: Option<String>, annotations: Option<Annotations>, bitfield_width: Option<u32>, - mutable: bool, offset: Option<usize>, ) -> RawField { RawField(FieldData { @@ -452,7 +444,6 @@ impl RawField { comment, annotations: annotations.unwrap_or_default(), bitfield_width, - mutable, offset, }) } @@ -475,10 +466,6 @@ impl FieldMethods for RawField { self.0.bitfield_width() } - fn is_mutable(&self) -> bool { - self.0.is_mutable() - } - fn annotations(&self) -> &Annotations { self.0.annotations() } @@ -891,9 +878,6 @@ pub struct FieldData { /// If this field is a bitfield, and how many bits does it contain if it is. bitfield_width: Option<u32>, - /// If the C++ field is marked as `mutable` - mutable: bool, - /// The offset of the field (in bits) offset: Option<usize>, } @@ -915,10 +899,6 @@ impl FieldMethods for FieldData { self.bitfield_width } - fn is_mutable(&self) -> bool { - self.mutable - } - fn annotations(&self) -> &Annotations { &self.annotations } @@ -1262,9 +1242,8 @@ impl CompInfo { // anonymous field. Detect that case here, and do // nothing. } else { - let field = RawField::new( - None, ty, None, None, None, false, offset, - ); + let field = + RawField::new(None, ty, None, None, None, offset); ci.fields.append_raw_field(field); } } @@ -1284,7 +1263,7 @@ impl CompInfo { }); if !used { let field = RawField::new( - None, ty, None, None, None, false, offset, + None, ty, None, None, None, offset, ); ci.fields.append_raw_field(field); } @@ -1301,7 +1280,6 @@ impl CompInfo { let comment = cur.raw_comment(); let annotations = Annotations::new(&cur); let name = cur.spelling(); - let is_mutable = cursor.is_mutable_field(); let offset = cur.offset_of_field().ok(); // Name can be empty if there are bitfields, for example, @@ -1319,7 +1297,6 @@ impl CompInfo { comment, annotations, bit_width, - is_mutable, offset, ); ci.fields.append_raw_field(field); @@ -1527,8 +1504,7 @@ impl CompInfo { }); if let Some((ty, _, offset)) = maybe_anonymous_struct_field { - let field = - RawField::new(None, ty, None, None, None, false, offset); + let field = RawField::new(None, ty, None, None, None, offset); ci.fields.append_raw_field(field); } |