ctfe interpreter: extend provenance so that it can track whether a pointer is immutable

This commit is contained in:
Ralf Jung 2023-11-25 18:41:53 +01:00
parent 85a4bd8f58
commit cb86303342
38 changed files with 261 additions and 145 deletions

View file

@ -105,7 +105,7 @@ impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V> {
bug!("from_const: invalid ScalarPair layout: {:#?}", layout);
};
let a = Scalar::from_pointer(
Pointer::new(bx.tcx().reserve_and_set_memory_alloc(data), Size::ZERO),
Pointer::new(bx.tcx().reserve_and_set_memory_alloc(data).into(), Size::ZERO),
&bx.tcx(),
);
let a_llval = bx.scalar_to_backend(