diff options
| author | Ralf Jung <post@ralfj.de> | 2023-09-12 07:49:25 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-09-14 07:27:30 +0200 |
| commit | a5b81faef0c0c70a7a254c5146e70629a2d5c923 (patch) | |
| tree | d6bc175ac871834a5795d5ec126efba8bc6ea02c | |
| parent | d1ea6997e8aa05dc145c33ba5e38a37901950404 (diff) | |
| download | rust-a5b81faef0c0c70a7a254c5146e70629a2d5c923.tar.gz rust-a5b81faef0c0c70a7a254c5146e70629a2d5c923.zip | |
cleanup op_to_const a bit; rename ConstValue::ByRef → Indirect
| -rw-r--r-- | src/constant.rs | 4 | ||||
| -rw-r--r-- | src/intrinsics/simd.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/constant.rs b/src/constant.rs index a60964f0f75..12e492da6e9 100644 --- a/src/constant.rs +++ b/src/constant.rs @@ -116,7 +116,7 @@ pub(crate) fn codegen_const_value<'tcx>( } match const_val { - ConstValue::ZeroSized => unreachable!(), // we already handles ZST above + ConstValue::ZeroSized => unreachable!(), // we already handled ZST above ConstValue::Scalar(x) => match x { Scalar::Int(int) => { if fx.clif_type(layout.ty).is_some() { @@ -200,7 +200,7 @@ pub(crate) fn codegen_const_value<'tcx>( CValue::by_val(val, layout) } }, - ConstValue::ByRef { alloc_id, offset } => { + ConstValue::Indirect { alloc_id, offset } => { let alloc = fx.tcx.global_alloc(alloc_id).unwrap_memory(); // FIXME: avoid creating multiple allocations for the same AllocId? CValue::by_ref( diff --git a/src/intrinsics/simd.rs b/src/intrinsics/simd.rs index e17d587076f..c64a4008996 100644 --- a/src/intrinsics/simd.rs +++ b/src/intrinsics/simd.rs @@ -172,7 +172,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>( .expect("simd_shuffle idx not const"); let idx_bytes = match idx_const { - ConstValue::ByRef { alloc_id, offset } => { + ConstValue::Indirect { alloc_id, offset } => { let alloc = fx.tcx.global_alloc(alloc_id).unwrap_memory(); let size = Size::from_bytes( 4 * ret_lane_count, /* size_of([u32; ret_lane_count]) */ |
