Use FieldIdx
in various things related to aggregates
Shrank `AggregateKind` by 8 bytes on x64, since the active field of a union is tracked as an `Option<FieldIdx>` instead of `Option<usize>`.
This commit is contained in:
parent
480068c235
commit
b5b6def021
13 changed files with 51 additions and 46 deletions
|
@ -274,7 +274,7 @@ impl<'tcx> TransformVisitor<'tcx> {
|
|||
statements.push(Statement {
|
||||
kind: StatementKind::Assign(Box::new((
|
||||
Place::return_place(),
|
||||
Rvalue::Aggregate(Box::new(kind), vec![]),
|
||||
Rvalue::Aggregate(Box::new(kind), IndexVec::new()),
|
||||
))),
|
||||
source_info,
|
||||
});
|
||||
|
@ -287,7 +287,7 @@ impl<'tcx> TransformVisitor<'tcx> {
|
|||
statements.push(Statement {
|
||||
kind: StatementKind::Assign(Box::new((
|
||||
Place::return_place(),
|
||||
Rvalue::Aggregate(Box::new(kind), vec![val]),
|
||||
Rvalue::Aggregate(Box::new(kind), IndexVec::from_iter([val])),
|
||||
))),
|
||||
source_info,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue