Fix typo, minor changes.

This commit is contained in:
Christoffer Lerno
2025-01-06 12:36:59 +01:00
parent f801372074
commit 737559d3f8
3 changed files with 8 additions and 13 deletions

View File

@@ -175,7 +175,7 @@ static void usage(bool full)
PRINTF(" --winsdk <dir> - Set the directory for Windows system library files for cross compilation.");
PRINTF(" --wincrt=<option> - Windows CRT linking: none, static-debug, static, dynamic-debug (default if debug info enabled), dynamic (default).");
PRINTF(" --windef <file> - Use Windows 'def' file for function exports instead of 'dllexport'.");
PRINTF(" --win-vs-dirs <dir>;<dir> - Override Windows VS detection.");
PRINTF(" --win-vs-dirs <dir>;<dir> - Override Windows VS detection.");
PRINTF("");
PRINTF(" --macossdk <dir> - Set the directory for the MacOS SDK for cross compilation.");
PRINTF(" --macos-min-version <ver> - Set the minimum MacOS version to compile for.");

View File

@@ -640,6 +640,8 @@ bool expr_is_pure(Expr *expr)
if (!expr) return true;
switch (expr->expr_kind)
{
case EXPR_CAST:
UNREACHABLE
case EXPR_BUILTIN:
case EXPR_BENCHMARK_HOOK:
case EXPR_TEST_HOOK:
@@ -703,10 +705,8 @@ bool expr_is_pure(Expr *expr)
case EXPR_LAST_FAULT:
case EXPR_MEMBER_GET:
return true;
case EXPR_VASPLAT:
return true;
case EXPR_BITASSIGN:
return false;
case EXPR_VASPLAT:
case EXPR_ANYSWITCH:
return false;
case EXPR_BINARY:
@@ -763,8 +763,6 @@ bool expr_is_pure(Expr *expr)
case EXPR_FORCE_UNWRAP:
case EXPR_SUBSCRIPT_ASSIGN:
return false;
case EXPR_CAST:
return exprid_is_pure(expr->cast_expr.expr);
case EXPR_EXPRESSION_LIST:
{
FOREACH(Expr *, e, expr->expression_list)

View File

@@ -7035,6 +7035,10 @@ void llvm_emit_expr(GenContext *c, BEValue *value, Expr *expr)
case EXPR_DESIGNATOR:
case EXPR_MEMBER_GET:
case EXPR_NAMED_ARGUMENT:
case EXPR_BUILTIN:
case EXPR_COMPOUND_LITERAL:
case EXPR_OPERATOR_CHARS:
case EXPR_CAST:
UNREACHABLE
case EXPR_VECTOR_TO_ARRAY:
llvm_emit_vector_to_array(c, value, expr);
@@ -7162,8 +7166,6 @@ void llvm_emit_expr(GenContext *c, BEValue *value, Expr *expr)
case EXPR_TYPEID_INFO:
llvm_emit_typeid_info(c, value, expr);
return;
case EXPR_BUILTIN:
UNREACHABLE;
case EXPR_DECL:
llvm_emit_local_decl(c, expr->decl_expr, value);
return;
@@ -7188,9 +7190,6 @@ void llvm_emit_expr(GenContext *c, BEValue *value, Expr *expr)
case EXPR_EXPR_BLOCK:
llvm_emit_expr_block(c, value, expr);
return;
case EXPR_COMPOUND_LITERAL:
case EXPR_OPERATOR_CHARS:
UNREACHABLE
case EXPR_INITIALIZER_LIST:
case EXPR_DESIGNATED_INITIALIZER_LIST:
llvm_emit_initializer_list_expr(c, value, expr);
@@ -7248,8 +7247,6 @@ void llvm_emit_expr(GenContext *c, BEValue *value, Expr *expr)
case EXPR_EXPRESSION_LIST:
llvm_emit_expression_list_expr(c, value, expr);
return;
case EXPR_CAST:
UNREACHABLE
case EXPR_BITACCESS:
llvm_emit_bitaccess(c, value, expr);
return;