Put PlaceValue
into OperandValue::Ref
, rather than 3 tuple fields
This commit is contained in:
parent
89502e584b
commit
3596098823
8 changed files with 76 additions and 63 deletions
|
@ -7,7 +7,7 @@ use crate::type_of::LayoutLlvmExt;
|
|||
use crate::value::Value;
|
||||
|
||||
use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
|
||||
use rustc_codegen_ssa::mir::place::PlaceRef;
|
||||
use rustc_codegen_ssa::mir::place::{PlaceRef, PlaceValue};
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_codegen_ssa::MemFlags;
|
||||
use rustc_middle::bug;
|
||||
|
@ -207,7 +207,7 @@ impl<'ll, 'tcx> ArgAbiExt<'ll, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
|
|||
// Sized indirect arguments
|
||||
PassMode::Indirect { attrs, meta_attrs: None, on_stack: _ } => {
|
||||
let align = attrs.pointee_align.unwrap_or(self.layout.align.abi);
|
||||
OperandValue::Ref(val, None, align).store(bx, dst);
|
||||
OperandValue::Ref(PlaceValue::new_sized(val, align)).store(bx, dst);
|
||||
}
|
||||
// Unsized indirect qrguments
|
||||
PassMode::Indirect { attrs: _, meta_attrs: Some(_), on_stack: _ } => {
|
||||
|
@ -265,7 +265,12 @@ impl<'ll, 'tcx> ArgAbiExt<'ll, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
|
|||
OperandValue::Pair(next(), next()).store(bx, dst);
|
||||
}
|
||||
PassMode::Indirect { attrs: _, meta_attrs: Some(_), on_stack: _ } => {
|
||||
OperandValue::Ref(next(), Some(next()), self.layout.align.abi).store(bx, dst);
|
||||
let place_val = PlaceValue {
|
||||
llval: next(),
|
||||
llextra: Some(next()),
|
||||
align: self.layout.align.abi,
|
||||
};
|
||||
OperandValue::Ref(place_val).store(bx, dst);
|
||||
}
|
||||
PassMode::Direct(_)
|
||||
| PassMode::Indirect { attrs: _, meta_attrs: None, on_stack: _ }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue