aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2022-02-08 15:18:53 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-02-08 15:18:53 -0300
commit0a82f74ce25a59048a42b9219d1d1e04357831b8 (patch)
treee913c99c898efc7218d36346bf37db41405b0a22
parentfac821246c582299fc3f7dbd0b84aad43f27e355 (diff)
downloadpahole-0a82f74ce25a59048a42b9219d1d1e04357831b8.tar.gz
core: Make type->packed_attributes_inferred a one bit member
To make up space, it is not that much used. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--dwarves.c8
-rw-r--r--dwarves.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/dwarves.c b/dwarves.c
index 81fa47bf..8ab01527 100644
--- a/dwarves.c
+++ b/dwarves.c
@@ -1607,7 +1607,7 @@ void type__check_structs_at_unnatural_alignments(struct type *type, const struct
struct class *cls = tag__class(member_type);
cls->is_packed = true;
- cls->type.packed_attributes_inferred = true;
+ cls->type.packed_attributes_inferred = 1;
}
}
}
@@ -1663,7 +1663,7 @@ bool class__infer_packed_attributes(struct class *cls, const struct cu *cu)
cls->is_packed = true;
out:
- ctype->packed_attributes_inferred = true;
+ ctype->packed_attributes_inferred = 1;
return cls->is_packed;
}
@@ -1695,11 +1695,11 @@ void union__infer_packed_attributes(struct type *type, const struct cu *cu)
struct class *cls = tag__class(member_type);
cls->is_packed = true;
- cls->type.packed_attributes_inferred = true;
+ cls->type.packed_attributes_inferred = 1;
}
}
- type->packed_attributes_inferred = true;
+ type->packed_attributes_inferred = 1;
}
/** class__has_hole_ge - check if class has a hole greater or equal to @size
diff --git a/dwarves.h b/dwarves.h
index 2d68510c..67d1a9e9 100644
--- a/dwarves.h
+++ b/dwarves.h
@@ -1038,7 +1038,7 @@ struct type {
uint16_t member_prefix_len;
uint16_t max_tag_name_len;
uint16_t natural_alignment;
- bool packed_attributes_inferred;
+ uint8_t packed_attributes_inferred:1;
uint8_t declaration:1;
uint8_t definition_emitted:1;
uint8_t fwd_decl_emitted:1;