Skip to content

Commit

Permalink
[cpp] codegen - if-statements being NYI no longer is a compiler ICE, …
Browse files Browse the repository at this point in the history
…but instead a warning + no codegen
  • Loading branch information
harrand committed May 19, 2024
1 parent 2f6bc2e commit da53769
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cpp/src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,6 @@ namespace code
const semal::function_t* parent_function = d.state.try_find_parent_function(*d.ctx.tree, d.ctx.path);
d.ctx.assert_that(parent_function != nullptr && parent_function->userdata != nullptr, error_code::ice, "could not deduct parent enclosing function within if-statement");
auto* llvm_parent_fn = static_cast<llvm::Function*>(parent_function->userdata);
d.ctx.error(error_code::nyi, "if-statements are not yet implemented.");

llvm::BasicBlock* if_blk = nullptr;
{
Expand Down Expand Up @@ -998,6 +997,8 @@ namespace code
}, "if_else", true);
}

d.ctx.warning("if-statements are not yet implemented. no corresponding code will be generated.");

// todo: if statement logic.

return {};
Expand Down

0 comments on commit da53769

Please sign in to comment.