diff options
| author | Antoni Boucher <bouanto@zoho.com> | 2025-01-13 10:53:58 -0500 |
|---|---|---|
| committer | Antoni Boucher <bouanto@zoho.com> | 2025-01-13 10:53:58 -0500 |
| commit | 06f0a9bc785ad8654e1bf505f60ce7146b3850f3 (patch) | |
| tree | cedfc1ddcceaf4e0709e1a71fe36f8b4b6d9396e /compiler/rustc_codegen_gcc/src/common.rs | |
| parent | 3ff1b6410e87a237559ab76ecd50f180afbe861f (diff) | |
| parent | 59a81c2ca1edc88ad3ac4b27a8e03977ffb8e73a (diff) | |
| download | rust-06f0a9bc785ad8654e1bf505f60ce7146b3850f3.tar.gz rust-06f0a9bc785ad8654e1bf505f60ce7146b3850f3.zip | |
Merge commit '59a81c2ca1edc88ad3ac4b27a8e03977ffb8e73a' into subtree-update_cg_gcc_2025_01_12
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/common.rs')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/common.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_gcc/src/common.rs b/compiler/rustc_codegen_gcc/src/common.rs index 0d3e7083d56..f43743fc2a4 100644 --- a/compiler/rustc_codegen_gcc/src/common.rs +++ b/compiler/rustc_codegen_gcc/src/common.rs @@ -240,14 +240,14 @@ impl<'gcc, 'tcx> ConstCodegenMethods<'tcx> for CodegenCx<'gcc, 'tcx> { } }; let ptr_type = base_addr.get_type(); - let base_addr = self.const_bitcast(base_addr, self.usize_type); + let base_addr = self.context.new_cast(None, base_addr, self.usize_type); let offset = self.context.new_rvalue_from_long(self.usize_type, offset.bytes() as i64); - let ptr = self.const_bitcast(base_addr + offset, ptr_type); + let ptr = self.context.new_cast(None, base_addr + offset, ptr_type); if !matches!(layout.primitive(), Pointer(_)) { self.const_bitcast(ptr.dereference(None).to_rvalue(), ty) } else { - self.const_bitcast(ptr, ty) + self.context.new_cast(None, ptr, ty) } } } |
