diff options
| author | Manuel Drehwald <git@manuel.drehwald.info> | 2025-06-16 10:36:15 -0700 |
|---|---|---|
| committer | Manuel Drehwald <git@manuel.drehwald.info> | 2025-06-16 10:36:15 -0700 |
| commit | 7d3a1d49ab6bba49eae6536c77fc52152c9e3768 (patch) | |
| tree | db8299b67640d8647654d9cf32b0d7b2da6183e0 /compiler/rustc_codegen_llvm/src/common.rs | |
| parent | 2398bd60ef526e686a38a299cc2fa991d8b3c33e (diff) | |
| download | rust-7d3a1d49ab6bba49eae6536c77fc52152c9e3768.tar.gz rust-7d3a1d49ab6bba49eae6536c77fc52152c9e3768.zip | |
make more CodegenCx function generic
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/common.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/common.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/common.rs b/compiler/rustc_codegen_llvm/src/common.rs index 3cfa96393e9..ae5add59322 100644 --- a/compiler/rustc_codegen_llvm/src/common.rs +++ b/compiler/rustc_codegen_llvm/src/common.rs @@ -99,14 +99,14 @@ impl<'ll, CX: Borrow<SCx<'ll>>> BackendTypes for GenericCx<'ll, CX> { type DIVariable = &'ll llvm::debuginfo::DIVariable; } -impl<'ll> CodegenCx<'ll, '_> { +impl<'ll, CX: Borrow<SCx<'ll>>> GenericCx<'ll, CX> { pub(crate) fn const_array(&self, ty: &'ll Type, elts: &[&'ll Value]) -> &'ll Value { let len = u64::try_from(elts.len()).expect("LLVMConstArray2 elements len overflow"); unsafe { llvm::LLVMConstArray2(ty, elts.as_ptr(), len) } } pub(crate) fn const_bytes(&self, bytes: &[u8]) -> &'ll Value { - bytes_in_context(self.llcx, bytes) + bytes_in_context(self.llcx(), bytes) } pub(crate) fn const_get_elt(&self, v: &'ll Value, idx: u64) -> &'ll Value { |
