Skip to content

Commit 7d3a1d4

Browse files
committed
make more CodegenCx function generic
1 parent 2398bd6 commit 7d3a1d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_codegen_llvm/src/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,14 @@ impl<'ll, CX: Borrow<SCx<'ll>>> BackendTypes for GenericCx<'ll, CX> {
9999
type DIVariable = &'ll llvm::debuginfo::DIVariable;
100100
}
101101

102-
impl<'ll> CodegenCx<'ll, '_> {
102+
impl<'ll, CX: Borrow<SCx<'ll>>> GenericCx<'ll, CX> {
103103
pub(crate) fn const_array(&self, ty: &'ll Type, elts: &[&'ll Value]) -> &'ll Value {
104104
let len = u64::try_from(elts.len()).expect("LLVMConstArray2 elements len overflow");
105105
unsafe { llvm::LLVMConstArray2(ty, elts.as_ptr(), len) }
106106
}
107107

108108
pub(crate) fn const_bytes(&self, bytes: &[u8]) -> &'ll Value {
109-
bytes_in_context(self.llcx, bytes)
109+
bytes_in_context(self.llcx(), bytes)
110110
}
111111

112112
pub(crate) fn const_get_elt(&self, v: &'ll Value, idx: u64) -> &'ll Value {

0 commit comments

Comments
 (0)