@@ -27,12 +27,12 @@ use tracing::debug;
2727
2828pub fn const_alloc_to_llvm < ' ll > ( cx : & CodegenCx < ' ll , ' _ > , alloc : ConstAllocation < ' _ > ) -> & ' ll Value {
2929 let alloc = alloc. inner ( ) ;
30- let mut llvals = Vec :: with_capacity ( alloc. relocations ( ) . len ( ) + 1 ) ;
30+ let mut llvals = Vec :: with_capacity ( alloc. provenance ( ) . len ( ) + 1 ) ;
3131 let dl = cx. data_layout ( ) ;
3232 let pointer_size = dl. pointer_size . bytes ( ) as usize ;
3333
34- // Note: this function may call `inspect_with_uninit_and_ptr_outside_interpreter`,
35- // so `range` must be within the bounds of `alloc` and not contain or overlap a relocation .
34+ // Note: this function may call `inspect_with_uninit_and_ptr_outside_interpreter`, so `range`
35+ // must be within the bounds of `alloc` and not contain or overlap a pointer provenance .
3636 fn append_chunks_of_init_and_uninit_bytes < ' ll , ' a , ' b > (
3737 llvals : & mut Vec < & ' ll Value > ,
3838 cx : & ' a CodegenCx < ' ll , ' b > ,
@@ -79,12 +79,12 @@ pub fn const_alloc_to_llvm<'ll>(cx: &CodegenCx<'ll, '_>, alloc: ConstAllocation<
7979 }
8080
8181 let mut next_offset = 0 ;
82- for & ( offset, alloc_id) in alloc. relocations ( ) . iter ( ) {
82+ for & ( offset, alloc_id) in alloc. provenance ( ) . iter ( ) {
8383 let offset = offset. bytes ( ) ;
8484 assert_eq ! ( offset as usize as u64 , offset) ;
8585 let offset = offset as usize ;
8686 if offset > next_offset {
87- // This `inspect` is okay since we have checked that it is not within a relocation , it
87+ // This `inspect` is okay since we have checked that there is no provenance , it
8888 // is within the bounds of the allocation, and it doesn't affect interpreter execution
8989 // (we inspect the result after interpreter execution).
9090 append_chunks_of_init_and_uninit_bytes ( & mut llvals, cx, alloc, next_offset..offset) ;
@@ -93,7 +93,7 @@ pub fn const_alloc_to_llvm<'ll>(cx: &CodegenCx<'ll, '_>, alloc: ConstAllocation<
9393 dl. endian ,
9494 // This `inspect` is okay since it is within the bounds of the allocation, it doesn't
9595 // affect interpreter execution (we inspect the result after interpreter execution),
96- // and we properly interpret the relocation as a relocation pointer offset.
96+ // and we properly interpret the provenance as a relocation pointer offset.
9797 alloc. inspect_with_uninit_and_ptr_outside_interpreter ( offset..( offset + pointer_size) ) ,
9898 )
9999 . expect ( "const_alloc_to_llvm: could not read relocation pointer" )
@@ -121,7 +121,7 @@ pub fn const_alloc_to_llvm<'ll>(cx: &CodegenCx<'ll, '_>, alloc: ConstAllocation<
121121 }
122122 if alloc. len ( ) >= next_offset {
123123 let range = next_offset..alloc. len ( ) ;
124- // This `inspect` is okay since we have check that it is after all relocations , it is
124+ // This `inspect` is okay since we have check that it is after all provenance , it is
125125 // within the bounds of the allocation, and it doesn't affect interpreter execution (we
126126 // inspect the result after interpreter execution).
127127 append_chunks_of_init_and_uninit_bytes ( & mut llvals, cx, alloc, range) ;
@@ -479,15 +479,15 @@ impl<'ll> StaticMethods for CodegenCx<'ll, '_> {
479479 //
480480 // We could remove this hack whenever we decide to drop macOS 10.10 support.
481481 if self . tcx . sess . target . is_like_osx {
482- // The `inspect` method is okay here because we checked relocations , and
482+ // The `inspect` method is okay here because we checked for provenance , and
483483 // because we are doing this access to inspect the final interpreter state
484484 // (not as part of the interpreter execution).
485485 //
486486 // FIXME: This check requires that the (arbitrary) value of undefined bytes
487487 // happens to be zero. Instead, we should only check the value of defined bytes
488488 // and set all undefined bytes to zero if this allocation is headed for the
489489 // BSS.
490- let all_bytes_are_zero = alloc. relocations ( ) . is_empty ( )
490+ let all_bytes_are_zero = alloc. provenance ( ) . is_empty ( )
491491 && alloc
492492 . inspect_with_uninit_and_ptr_outside_interpreter ( 0 ..alloc. len ( ) )
493493 . iter ( )
@@ -511,9 +511,9 @@ impl<'ll> StaticMethods for CodegenCx<'ll, '_> {
511511 section. as_str ( ) . as_ptr ( ) . cast ( ) ,
512512 section. as_str ( ) . len ( ) as c_uint ,
513513 ) ;
514- assert ! ( alloc. relocations ( ) . is_empty( ) ) ;
514+ assert ! ( alloc. provenance ( ) . is_empty( ) ) ;
515515
516- // The `inspect` method is okay here because we checked relocations , and
516+ // The `inspect` method is okay here because we checked for provenance , and
517517 // because we are doing this access to inspect the final interpreter state (not
518518 // as part of the interpreter execution).
519519 let bytes =
0 commit comments