mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Change const checking in if lowering.
This commit is contained in:
@@ -422,7 +422,7 @@ static void llvm_emit_if_stmt(GenContext *c, Ast *ast)
|
||||
|
||||
if (llvm_value_is_const(&be_value) && then_block != else_block)
|
||||
{
|
||||
if (LLVMConstIntGetZExtValue(be_value.value))
|
||||
if (!LLVMIsNull(be_value.value))
|
||||
{
|
||||
llvm_emit_br(c, then_block);
|
||||
else_block = exit_block;
|
||||
|
||||
Reference in New Issue
Block a user