diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2022-05-31 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2022-05-31 00:00:00 +0000 |
| commit | dff602fc18be295d1b87196a6eee1c72673e6bb8 (patch) | |
| tree | 3c08934e4fe11ed94c9875185f3e61bcdd1a2484 /compiler/rustc_codegen_cranelift | |
| parent | d35d972e6974d40d30362344ea619a5b560aae20 (diff) | |
| download | rust-dff602fc18be295d1b87196a6eee1c72673e6bb8.tar.gz rust-dff602fc18be295d1b87196a6eee1c72673e6bb8.zip | |
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.
Diffstat (limited to 'compiler/rustc_codegen_cranelift')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/base.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/base.rs b/compiler/rustc_codegen_cranelift/src/base.rs index 3fe112d794b..7c59ce354c0 100644 --- a/compiler/rustc_codegen_cranelift/src/base.rs +++ b/compiler/rustc_codegen_cranelift/src/base.rs @@ -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); |
