about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/common.rs
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-06-17 23:19:36 +0200
committerGitHub <noreply@github.com>2025-06-17 23:19:36 +0200
commit0eb8a661303aefab11365f898d78ea3e30a38971 (patch)
tree682513d577129438f6fa383d0ce6955aab5685f7 /compiler/rustc_codegen_llvm/src/common.rs
parenteb7d246d858d6ff6c996d057b7f2455573f7826e (diff)
parent6359123d25e8ff38c6fbf280559d5f829bec691f (diff)
downloadrust-0eb8a661303aefab11365f898d78ea3e30a38971.tar.gz
rust-0eb8a661303aefab11365f898d78ea3e30a38971.zip
Rollup merge of #142588 - ZuseZ4:generic-ctx-imprv, r=oli-obk
Generic ctx imprv

Cleanup work for my gpu pr

r? `@oli-obk`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/common.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/common.rs4
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 {