Add a pointer to address cast kind
A pointer to address cast are often special-cased. Introduce a dedicated cast kind to make them easy distinguishable.
This commit is contained in:
parent
d27ec6c86d
commit
e60087505e
1 changed files with 1 additions and 1 deletions
|
|
@ -607,7 +607,7 @@ fn codegen_stmt<'tcx>(
|
|||
let operand = codegen_operand(fx, operand);
|
||||
lval.write_cvalue(fx, operand.cast_pointer_to(to_layout));
|
||||
}
|
||||
Rvalue::Cast(CastKind::Misc, ref operand, to_ty) => {
|
||||
Rvalue::Cast(CastKind::Misc | CastKind::PointerAddress, ref operand, to_ty) => {
|
||||
let operand = codegen_operand(fx, operand);
|
||||
let from_ty = operand.layout().ty;
|
||||
let to_ty = fx.monomorphize(to_ty);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue