@@ -27,12 +27,12 @@ use tracing::debug;
27
27
28
28
pub fn const_alloc_to_llvm < ' ll > ( cx : & CodegenCx < ' ll , ' _ > , alloc : ConstAllocation < ' _ > ) -> & ' ll Value {
29
29
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 ) ;
31
31
let dl = cx. data_layout ( ) ;
32
32
let pointer_size = dl. pointer_size . bytes ( ) as usize ;
33
33
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 .
36
36
fn append_chunks_of_init_and_uninit_bytes < ' ll , ' a , ' b > (
37
37
llvals : & mut Vec < & ' ll Value > ,
38
38
cx : & ' a CodegenCx < ' ll , ' b > ,
@@ -79,12 +79,12 @@ pub fn const_alloc_to_llvm<'ll>(cx: &CodegenCx<'ll, '_>, alloc: ConstAllocation<
79
79
}
80
80
81
81
let mut next_offset = 0 ;
82
- for & ( offset, alloc_id) in alloc. relocations ( ) . iter ( ) {
82
+ for & ( offset, alloc_id) in alloc. provenance ( ) . iter ( ) {
83
83
let offset = offset. bytes ( ) ;
84
84
assert_eq ! ( offset as usize as u64 , offset) ;
85
85
let offset = offset as usize ;
86
86
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
88
88
// is within the bounds of the allocation, and it doesn't affect interpreter execution
89
89
// (we inspect the result after interpreter execution).
90
90
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<
93
93
dl. endian ,
94
94
// This `inspect` is okay since it is within the bounds of the allocation, it doesn't
95
95
// 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.
97
97
alloc. inspect_with_uninit_and_ptr_outside_interpreter ( offset..( offset + pointer_size) ) ,
98
98
)
99
99
. 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<
121
121
}
122
122
if alloc. len ( ) >= next_offset {
123
123
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
125
125
// within the bounds of the allocation, and it doesn't affect interpreter execution (we
126
126
// inspect the result after interpreter execution).
127
127
append_chunks_of_init_and_uninit_bytes ( & mut llvals, cx, alloc, range) ;
@@ -479,15 +479,15 @@ impl<'ll> StaticMethods for CodegenCx<'ll, '_> {
479
479
//
480
480
// We could remove this hack whenever we decide to drop macOS 10.10 support.
481
481
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
483
483
// because we are doing this access to inspect the final interpreter state
484
484
// (not as part of the interpreter execution).
485
485
//
486
486
// FIXME: This check requires that the (arbitrary) value of undefined bytes
487
487
// happens to be zero. Instead, we should only check the value of defined bytes
488
488
// and set all undefined bytes to zero if this allocation is headed for the
489
489
// BSS.
490
- let all_bytes_are_zero = alloc. relocations ( ) . is_empty ( )
490
+ let all_bytes_are_zero = alloc. provenance ( ) . is_empty ( )
491
491
&& alloc
492
492
. inspect_with_uninit_and_ptr_outside_interpreter ( 0 ..alloc. len ( ) )
493
493
. iter ( )
@@ -511,9 +511,9 @@ impl<'ll> StaticMethods for CodegenCx<'ll, '_> {
511
511
section. as_str ( ) . as_ptr ( ) . cast ( ) ,
512
512
section. as_str ( ) . len ( ) as c_uint ,
513
513
) ;
514
- assert ! ( alloc. relocations ( ) . is_empty( ) ) ;
514
+ assert ! ( alloc. provenance ( ) . is_empty( ) ) ;
515
515
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
517
517
// because we are doing this access to inspect the final interpreter state (not
518
518
// as part of the interpreter execution).
519
519
let bytes =
0 commit comments