Skip to content

Commit

Permalink
Better way of forming an IntId.
Browse files Browse the repository at this point in the history
Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
  • Loading branch information
zygoloid and jonmeow authored Nov 18, 2024
1 parent ec2d00f commit 33d5d0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion toolchain/check/convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static auto MakeElementAccessInst(Context& context, SemIR::LocId loc_id,
auto index_id = block.template AddInst<SemIR::IntValue>(
loc_id, {.type_id = context.GetBuiltinType(
SemIR::BuiltinInstKind::IntLiteralType),
.int_id = context.ints().AddUnsigned(llvm::APInt(64, i))});
.int_id = context.ints().Add(static_cast<int64_t>(i))});
return block.template AddInst<AccessInstT>(
loc_id, {elem_type_id, aggregate_id, index_id});
} else {
Expand Down

0 comments on commit 33d5d0f

Please sign in to comment.