diff options
| author | bors <bors@rust-lang.org> | 2024-07-11 17:10:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-07-11 17:10:09 +0000 |
| commit | a3d6efc9bcdc379e766735cc53e065d85a1755e9 (patch) | |
| tree | 24923a8226aad3064a6c5739540c2d404d64f76e /compiler/rustc_codegen_llvm/src/common.rs | |
| parent | 45609a995e766d614da694d353f7aee03820b0f9 (diff) | |
| parent | 62bbce2ad2b20d5cf1282da407d01de5c54161f1 (diff) | |
| download | rust-a3d6efc9bcdc379e766735cc53e065d85a1755e9.tar.gz rust-a3d6efc9bcdc379e766735cc53e065d85a1755e9.zip | |
Auto merge of #17581 - lnicola:sync-from-rust, r=lnicola
minor: Sync from rust
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/common.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/common.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_llvm/src/common.rs b/compiler/rustc_codegen_llvm/src/common.rs index 4ffc92eb633..fe64649cf70 100644 --- a/compiler/rustc_codegen_llvm/src/common.rs +++ b/compiler/rustc_codegen_llvm/src/common.rs @@ -289,8 +289,8 @@ impl<'ll, 'tcx> ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> { (value, AddressSpace::DATA) } } - GlobalAlloc::Function(fn_instance) => ( - self.get_fn_addr(fn_instance.polymorphize(self.tcx)), + GlobalAlloc::Function { instance, .. } => ( + self.get_fn_addr(instance.polymorphize(self.tcx)), self.data_layout().instruction_address_space, ), GlobalAlloc::VTable(ty, trait_ref) => { @@ -329,10 +329,6 @@ impl<'ll, 'tcx> ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> { const_alloc_to_llvm(self, alloc, /*static*/ false) } - fn const_bitcast(&self, val: &'ll Value, ty: &'ll Type) -> &'ll Value { - self.const_bitcast(val, ty) - } - fn const_ptr_byte_offset(&self, base_addr: Self::Value, offset: abi::Size) -> Self::Value { unsafe { llvm::LLVMConstInBoundsGEP2( |
