Skip to content

Commit e876f43

Browse files
committed
fix cranelift and gcc
1 parent 5a1c8e8 commit e876f43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/consts.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,12 @@ impl<'gcc, 'tcx> CodegenCx<'gcc, 'tcx> {
297297

298298
pub fn const_alloc_to_gcc<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, alloc: ConstAllocation<'tcx>) -> RValue<'gcc> {
299299
let alloc = alloc.inner();
300-
let mut llvals = Vec::with_capacity(alloc.provenance().len() + 1);
300+
let mut llvals = Vec::with_capacity(alloc.provenance().ptrs().len() + 1);
301301
let dl = cx.data_layout();
302302
let pointer_size = dl.pointer_size.bytes() as usize;
303303

304304
let mut next_offset = 0;
305-
for &(offset, alloc_id) in alloc.provenance().iter() {
305+
for &(offset, alloc_id) in alloc.provenance().ptrs().iter() {
306306
let offset = offset.bytes();
307307
assert_eq!(offset as usize as u64, offset);
308308
let offset = offset as usize;

0 commit comments

Comments
 (0)