mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
Removing use of $assignable and deprecate it. Fix regression for stacktraces on MacOS. Added readline_to_stream. Regression: Chaining an optional together with contracts could in some cases lose the optional.
This commit is contained in:
@@ -1359,14 +1359,13 @@ void llvm_emit_ignored_expr(GenContext *c, Expr *expr)
|
||||
LLVMBasicBlockRef discard_fail = llvm_basic_block_new(c, "voiderr");
|
||||
PUSH_CATCH_VAR_BLOCK(NULL, discard_fail);
|
||||
llvm_emit_expr(c, &value, expr);
|
||||
llvm_value_fold_optional(c, &value);
|
||||
EMIT_EXPR_LOC(c, expr);
|
||||
// We only optimize if there is no instruction the current block
|
||||
if (!LLVMGetFirstInstruction(c->current_block))
|
||||
{
|
||||
llvm_prune_optional(c, discard_fail);
|
||||
}
|
||||
else
|
||||
else if (!llvm_basic_block_is_unused(discard_fail))
|
||||
{
|
||||
llvm_emit_br(c, discard_fail);
|
||||
llvm_emit_block(c, discard_fail);
|
||||
|
||||
Reference in New Issue
Block a user