Tolerate non-ptr indirect scalars in codegen.
This commit is contained in:
parent
3050938abd
commit
6992405674
@ -156,7 +156,7 @@ impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V> {
|
|||||||
Abi::Scalar(s @ abi::Scalar::Initialized { .. }) => {
|
Abi::Scalar(s @ abi::Scalar::Initialized { .. }) => {
|
||||||
let size = s.size(bx);
|
let size = s.size(bx);
|
||||||
assert_eq!(size, layout.size, "abi::Scalar size does not match layout size");
|
assert_eq!(size, layout.size, "abi::Scalar size does not match layout size");
|
||||||
let val = read_scalar(Size::ZERO, size, s, bx.type_ptr());
|
let val = read_scalar(Size::ZERO, size, s, bx.backend_type(layout));
|
||||||
OperandRef { val: OperandValue::Immediate(val), layout }
|
OperandRef { val: OperandValue::Immediate(val), layout }
|
||||||
}
|
}
|
||||||
Abi::ScalarPair(
|
Abi::ScalarPair(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user