mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Convert constant tag to the correct type for LLVMAddCase
This commit is contained in:
@@ -4909,6 +4909,7 @@ void lb_build_switch_stmt(lbProcedure *p, AstSwitchStmt *ss, Scope *scope) {
|
|||||||
GB_ASSERT(!is_ast_range(expr));
|
GB_ASSERT(!is_ast_range(expr));
|
||||||
|
|
||||||
on_val = lb_build_expr(p, expr);
|
on_val = lb_build_expr(p, expr);
|
||||||
|
on_val = lb_emit_conv(p, on_val, tag.type);
|
||||||
}
|
}
|
||||||
|
|
||||||
GB_ASSERT(LLVMIsConstant(on_val.value));
|
GB_ASSERT(LLVMIsConstant(on_val.value));
|
||||||
|
|||||||
Reference in New Issue
Block a user