diff --git a/src/compiler/llvm_codegen_stmt.c b/src/compiler/llvm_codegen_stmt.c index 84a65aecc..63ebbdec2 100644 --- a/src/compiler/llvm_codegen_stmt.c +++ b/src/compiler/llvm_codegen_stmt.c @@ -1252,8 +1252,7 @@ LLVMValueRef llvm_emit_string_const(GenContext *c, const char *str, const char * LLVMValueRef llvm_emit_empty_string_const(GenContext *c) { - LLVMValueRef data[2] = { LLVMConstNull(c->char_ptr_type), llvm_const_int(c, type_usz, 0) }; - return llvm_get_struct_named(c->chars_type, data, 2); + return LLVMConstNull(c->chars_type); } LLVMValueRef llvm_emit_zstring(GenContext *c, const char *str) diff --git a/src/compiler/sema_stmts.c b/src/compiler/sema_stmts.c index 469de3af7..65e488919 100644 --- a/src/compiler/sema_stmts.c +++ b/src/compiler/sema_stmts.c @@ -82,7 +82,7 @@ static inline bool sema_analyse_assert_stmt(SemaContext *context, Ast *statement if (message_expr) { if (!sema_analyse_expr(context, message_expr)) return false; - if (!expr_is_const_string(message_expr)) RETURN_SEMA_ERROR(message_expr, "Expected a string as the error message."); + if (!expr_is_const_string(message_expr)) RETURN_SEMA_ERROR(message_expr, "Expected a constant string as the error message."); FOREACH_BEGIN(Expr *e, statement->assert_stmt.args) if (!sema_analyse_expr(context, e)) return false; FOREACH_END(); diff --git a/src/version.h b/src/version.h index f85e77f2b..ca688fa15 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define COMPILER_VERSION "0.4.539" \ No newline at end of file +#define COMPILER_VERSION "0.4.540" \ No newline at end of file