Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 5378b46

Browse files
RalfJungantoyo
authored andcommitted
fix cranelift and gcc
1 parent fb747d0 commit 5378b46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/consts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,12 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
279279

280280
pub fn const_alloc_to_gcc<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, alloc: ConstAllocation<'tcx>) -> RValue<'gcc> {
281281
let alloc = alloc.inner();
282-
let mut llvals = Vec::with_capacity(alloc.provenance().len() + 1);
282+
let mut llvals = Vec::with_capacity(alloc.provenance().ptrs().len() + 1);
283283
let dl = cx.data_layout();
284284
let pointer_size = dl.pointer_size.bytes() as usize;
285285

286286
let mut next_offset = 0;
287-
for &(offset, alloc_id) in alloc.provenance().iter() {
287+
for &(offset, alloc_id) in alloc.provenance().ptrs().iter() {
288288
let offset = offset.bytes();
289289
assert_eq!(offset as usize as u64, offset);
290290
let offset = offset as usize;

0 commit comments

Comments
 (0)