mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Segfault using ternary with no assignment #1468.
This commit is contained in:
@@ -4969,6 +4969,11 @@ void gencontext_emit_ternary_expr(GenContext *c, BEValue *value, Expr *expr)
|
||||
return;
|
||||
}
|
||||
|
||||
if (expr->type == type_void)
|
||||
{
|
||||
llvm_value_set(value, NULL, expr->type);
|
||||
return;
|
||||
}
|
||||
llvm_new_phi(c, value, "val", expr->type, lhs_value, lhs_exit, rhs_value, rhs_exit);
|
||||
}
|
||||
static LLVMValueRef llvm_emit_real(LLVMTypeRef type, Float f)
|
||||
|
||||
Reference in New Issue
Block a user