Interpret aggregates.
This commit is contained in:
parent
0241c29123
commit
feccf469fb
4 changed files with 29 additions and 21 deletions
|
@ -13,6 +13,7 @@ use rustc_middle::ty::cast::{CastTy, IntTy};
|
|||
use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf};
|
||||
use rustc_middle::ty::{self, adjustment::PointerCast, Instance, Ty, TyCtxt};
|
||||
use rustc_span::source_map::{Span, DUMMY_SP};
|
||||
use rustc_target::abi::VariantIdx;
|
||||
|
||||
impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
||||
#[instrument(level = "trace", skip(self, bx))]
|
||||
|
@ -115,6 +116,10 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
(dest, active_field_index)
|
||||
}
|
||||
}
|
||||
mir::AggregateKind::Generator(..) => {
|
||||
dest.codegen_set_discr(bx, VariantIdx::from_u32(0));
|
||||
(dest, None)
|
||||
}
|
||||
_ => (dest, None),
|
||||
};
|
||||
for (i, operand) in operands.iter().enumerate() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue