mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Merge pull request #2698 from rtfeldman/i/2696
Make sure casting to unsigned types performs zero-extension
This commit is contained in:
commit
cdf19e3feb
9 changed files with 67 additions and 16 deletions
|
@ -1778,9 +1778,9 @@ fn modify_refcount_union_help<'a, 'ctx, 'env>(
|
|||
.build_load(tag_id_ptr, "load_tag_id")
|
||||
.into_int_value();
|
||||
|
||||
let tag_id_u8 = env
|
||||
.builder
|
||||
.build_int_cast(tag_id, env.context.i8_type(), "tag_id_u8");
|
||||
let tag_id_u8 =
|
||||
env.builder
|
||||
.build_int_cast_sign_flag(tag_id, env.context.i8_type(), false, "tag_id_u8");
|
||||
|
||||
// next, make a jump table for all possible values of the tag_id
|
||||
let mut cases = Vec::with_capacity_in(tags.len(), env.arena);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue