diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-08-11 16:23:47 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-11 16:23:47 +0900 |
| commit | c27779f59b451949599d6f6ca74e8eb1026b02c0 (patch) | |
| tree | 8b178c1a52426c85cd67f94fbfe3227790c0f39b /src/librustc_codegen_llvm | |
| parent | f26f201d42df2a42124383eafaa23eb97f620718 (diff) | |
| parent | 0c6e8b61b6a4df87216570931c687874f28022fd (diff) | |
Rollup merge of #75226 - pnadon:miri-undef-uninit, r=RalfJung
Miri: Renamed "undef" to "uninit" Renamed remaining references to "undef" to "uninit" when referring to Miri. Impacted directories are: - `src/librustc_codegen_llvm/consts.rs` - `src/librustc_middle/mir/interpret/` - `src/librustc_middle/ty/print/pretty.rs` - `src/librustc_mir/` - `src/tools/clippy/clippy_lints/src/consts.rs` Upon building Miri based on the new changes it was verified that no changes needed to be made with the Miri project. Related issue #71193
Diffstat (limited to 'src/librustc_codegen_llvm')
| -rw-r--r-- | src/librustc_codegen_llvm/consts.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/librustc_codegen_llvm/consts.rs b/src/librustc_codegen_llvm/consts.rs index acfb294f7c1..024834bfe2a 100644 --- a/src/librustc_codegen_llvm/consts.rs +++ b/src/librustc_codegen_llvm/consts.rs @@ -41,7 +41,7 @@ pub fn const_alloc_to_llvm(cx: &CodegenCx<'ll, '_>, alloc: &Allocation) -> &'ll // some arbitrary byte value. // // FIXME: relay undef bytes to codegen as undef const bytes - let bytes = alloc.inspect_with_undef_and_ptr_outside_interpreter(next_offset..offset); + let bytes = alloc.inspect_with_uninit_and_ptr_outside_interpreter(next_offset..offset); llvals.push(cx.const_bytes(bytes)); } let ptr_offset = read_target_uint( @@ -49,7 +49,7 @@ pub fn const_alloc_to_llvm(cx: &CodegenCx<'ll, '_>, alloc: &Allocation) -> &'ll // This `inspect` is okay since it is within the bounds of the allocation, it doesn't // affect interpreter execution (we inspect the result after interpreter execution), // and we properly interpret the relocation as a relocation pointer offset. - alloc.inspect_with_undef_and_ptr_outside_interpreter(offset..(offset + pointer_size)), + alloc.inspect_with_uninit_and_ptr_outside_interpreter(offset..(offset + pointer_size)), ) .expect("const_alloc_to_llvm: could not read relocation pointer") as u64; @@ -74,7 +74,7 @@ pub fn const_alloc_to_llvm(cx: &CodegenCx<'ll, '_>, alloc: &Allocation) -> &'ll // arbitrary byte value. // // FIXME: relay undef bytes to codegen as undef const bytes - let bytes = alloc.inspect_with_undef_and_ptr_outside_interpreter(range); + let bytes = alloc.inspect_with_uninit_and_ptr_outside_interpreter(range); llvals.push(cx.const_bytes(bytes)); } @@ -452,7 +452,7 @@ impl StaticMethods for CodegenCx<'ll, 'tcx> { // BSS. let all_bytes_are_zero = alloc.relocations().is_empty() && alloc - .inspect_with_undef_and_ptr_outside_interpreter(0..alloc.len()) + .inspect_with_uninit_and_ptr_outside_interpreter(0..alloc.len()) .iter() .all(|&byte| byte == 0); @@ -480,7 +480,7 @@ impl StaticMethods for CodegenCx<'ll, 'tcx> { // because we are doing this access to inspect the final interpreter state (not // as part of the interpreter execution). let bytes = - alloc.inspect_with_undef_and_ptr_outside_interpreter(0..alloc.len()); + alloc.inspect_with_uninit_and_ptr_outside_interpreter(0..alloc.len()); let alloc = llvm::LLVMMDStringInContext( self.llcx, bytes.as_ptr().cast(), |
