mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Allocator uses protocols. Fix bug where it was not possible to pass a ref variable as a ref variable. Correct codegen for !anyptr.
This commit is contained in:
committed by
Christoffer Lerno
parent
54f32ed71b
commit
89d4c2cab7
@@ -2606,6 +2606,12 @@ static void llvm_emit_unary_expr(GenContext *c, BEValue *value, Expr *expr)
|
||||
llvm_value_rvalue(c, value);
|
||||
llvm_value = LLVMBuildIsNull(c->builder, value->value, "not");
|
||||
break;
|
||||
case TYPE_ANYPTR:
|
||||
case TYPE_PROPTR:
|
||||
llvm_emit_any_pointer(c, value, value);
|
||||
llvm_value_rvalue(c, value);
|
||||
llvm_value = LLVMBuildIsNull(c->builder, value->value, "not");
|
||||
break;
|
||||
default:
|
||||
DEBUG_LOG("Unexpectedly tried to not %s", type_quoted_error_string(inner->type));
|
||||
UNREACHABLE
|
||||
|
||||
Reference in New Issue
Block a user