diff options
| author | gingerBill <bill@gingerbill.org> | 2021-07-10 22:29:52 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-07-10 22:29:52 +0100 |
| commit | adb25d9d1954e80e0a9e5201505c355dbc713c82 (patch) | |
| tree | adc23d6fa5501e5387c9f47290786f043116e8a0 /src/llvm_backend.cpp | |
| parent | 2949e4b0c7ab1c0f8d30ed2263ecd43d2c56aade (diff) | |
Convert constant tag to the correct type for LLVMAddCase
Diffstat (limited to 'src/llvm_backend.cpp')
| -rw-r--r-- | src/llvm_backend.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index e1205b471..a457f5c57 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -4909,6 +4909,7 @@ void lb_build_switch_stmt(lbProcedure *p, AstSwitchStmt *ss, Scope *scope) { GB_ASSERT(!is_ast_range(expr)); on_val = lb_build_expr(p, expr); + on_val = lb_emit_conv(p, on_val, tag.type); } GB_ASSERT(LLVMIsConstant(on_val.value)); |