Add unwrapping to variable for variant in switch.

This commit is contained in:
Christoffer Lerno
2021-12-12 15:15:38 +01:00
parent 908ac220c6
commit 5ddbf50e83
11 changed files with 575 additions and 70 deletions

View File

@@ -5167,6 +5167,7 @@ void llvm_emit_expr(GenContext *c, BEValue *value, Expr *expr)
case EXPR_PLACEHOLDER:
case EXPR_CT_CALL:
case EXPR_FLATPATH:
case EXPR_VARIANTSWITCH:
UNREACHABLE
case EXPR_TRY_UNWRAP_CHAIN:
llvm_emit_try_unwrap_chain(c, value, expr);
@@ -5187,6 +5188,7 @@ void llvm_emit_expr(GenContext *c, BEValue *value, Expr *expr)
TODO
case EXPR_DECL:
llvm_emit_local_decl(c, expr->decl_expr);
llvm_value_set_decl_address(value, expr->decl_expr);
return;
case EXPR_SLICE_ASSIGN:
llvm_emit_slice_assign(c, value, expr);