diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-04-10 17:58:54 +0200 |
|---|---|---|
| committer | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-04-10 17:58:54 +0200 |
| commit | b27008e0f97e9d18d5f9b3e3464ad0e607ba013d (patch) | |
| tree | 238d218c877a59ae06e30dc65bf55e135db8e265 /src/llvm_backend_expr.cpp | |
| parent | 3a7691c71406beb626170ad0f8d84c87195de48d (diff) | |
Simplify condition, op = Token_Sub was trivially true
Diffstat (limited to 'src/llvm_backend_expr.cpp')
| -rw-r--r-- | src/llvm_backend_expr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/llvm_backend_expr.cpp b/src/llvm_backend_expr.cpp index 5ecdc08d2..c5ea0ddac 100644 --- a/src/llvm_backend_expr.cpp +++ b/src/llvm_backend_expr.cpp @@ -234,7 +234,7 @@ gb_internal lbValue lb_emit_unary_arith(lbProcedure *p, TokenKind op, lbValue x, case Token_Sub: // Number negation if (is_type_integer(x.type)) { res.value = LLVMBuildNeg(p->builder, x.value, ""); - } else if (op == Token_Sub && bt->kind == Type_Enum && is_type_integer(bt->Enum.base_type)) { + } else if (bt->kind == Type_Enum && is_type_integer(bt->Enum.base_type)) { res.value = LLVMBuildNeg(p->builder, x.value, ""); } else if (is_type_float(x.type)) { res.value = LLVMBuildFNeg(p->builder, x.value, ""); |