Skip to content

Commit a5b81fa

Browse files
committed
cleanup op_to_const a bit; rename ConstValue::ByRef → Indirect
1 parent d1ea699 commit a5b81fa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/constant.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ pub(crate) fn codegen_const_value<'tcx>(
116116
}
117117

118118
match const_val {
119-
ConstValue::ZeroSized => unreachable!(), // we already handles ZST above
119+
ConstValue::ZeroSized => unreachable!(), // we already handled ZST above
120120
ConstValue::Scalar(x) => match x {
121121
Scalar::Int(int) => {
122122
if fx.clif_type(layout.ty).is_some() {
@@ -200,7 +200,7 @@ pub(crate) fn codegen_const_value<'tcx>(
200200
CValue::by_val(val, layout)
201201
}
202202
},
203-
ConstValue::ByRef { alloc_id, offset } => {
203+
ConstValue::Indirect { alloc_id, offset } => {
204204
let alloc = fx.tcx.global_alloc(alloc_id).unwrap_memory();
205205
// FIXME: avoid creating multiple allocations for the same AllocId?
206206
CValue::by_ref(

src/intrinsics/simd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
172172
.expect("simd_shuffle idx not const");
173173

174174
let idx_bytes = match idx_const {
175-
ConstValue::ByRef { alloc_id, offset } => {
175+
ConstValue::Indirect { alloc_id, offset } => {
176176
let alloc = fx.tcx.global_alloc(alloc_id).unwrap_memory();
177177
let size = Size::from_bytes(
178178
4 * ret_lane_count, /* size_of([u32; ret_lane_count]) */

0 commit comments

Comments
 (0)