zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 2f4f7ace7a03098ca2f7c8f8d07bfbe8c2deb93d (tree)
parent 6f220bb7caefbd83493b769addb0a83f8252e132
Author: LemonBoy <thatlemon@gmail.com>
Date:   Wed,  9 Dec 2020 16:58:13 +0100

stage1: Resolve some constants to u32, not usize

The latter may be smaller than a u32, use a u32 explicitly.

Diffstat:
Msrc/stage1/ir.cpp | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/stage1/ir.cpp b/src/stage1/ir.cpp @@ -26901,7 +26901,7 @@ static IrInstGen *ir_analyze_instruction_set_eval_branch_quota(IrAnalyze *ira, IrInstSrcSetEvalBranchQuota *instruction) { uint64_t new_quota; - if (!ir_resolve_usize(ira, instruction->new_quota->child, &new_quota)) + if (!ir_resolve_unsigned(ira, instruction->new_quota->child, ira->codegen->builtin_types.entry_u32, &new_quota)) return ira->codegen->invalid_inst_gen; if (new_quota > *ira->new_irb.exec->backward_branch_quota) {