From da537693c4bfe94801ae45ccc5baa226efc4849b Mon Sep 17 00:00:00 2001 From: Harrand Date: Mon, 20 May 2024 00:37:49 +0100 Subject: [PATCH] [cpp] codegen - if-statements being NYI no longer is a compiler ICE, but instead a warning + no codegen --- cpp/src/codegen.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/src/codegen.cpp b/cpp/src/codegen.cpp index d8743c0..88d75c9 100644 --- a/cpp/src/codegen.cpp +++ b/cpp/src/codegen.cpp @@ -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(parent_function->userdata); - d.ctx.error(error_code::nyi, "if-statements are not yet implemented."); llvm::BasicBlock* if_blk = nullptr; { @@ -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 {};