aboutsummaryrefslogtreecommitdiff
path: root/src/check_builtin.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-07-11 16:18:30 +0100
committergingerBill <bill@gingerbill.org>2021-07-11 16:18:30 +0100
commit63b572a0abd9fb3b64b4b70b3f94dbafb4642f57 (patch)
treea89b2a7da5d31279ffc47406874839ac3f868bce /src/check_builtin.cpp
parente90e7d4af985b0b19e23f87e45b9add5aab98f69 (diff)
Clean up big int to LLVM integer code
Diffstat (limited to 'src/check_builtin.cpp')
-rw-r--r--src/check_builtin.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/check_builtin.cpp b/src/check_builtin.cpp
index 3beaba2e8..3c692b601 100644
--- a/src/check_builtin.cpp
+++ b/src/check_builtin.cpp
@@ -745,7 +745,7 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
return false;
}
- if (op.value.value_integer.sign) {
+ if (big_int_is_neg(&op.value.value_integer)) {
error(op.expr, "Negative 'swizzle' index");
return false;
}
@@ -1843,7 +1843,7 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
operand->type = t_invalid;
return false;
}
- if (x.value.value_integer.sign) {
+ if (big_int_is_neg(&x.value.value_integer)) {
error(call, "Negative vector element length");
operand->mode = Addressing_Type;
operand->type = t_invalid;
@@ -1883,7 +1883,7 @@ bool check_builtin_procedure(CheckerContext *c, Operand *operand, Ast *call, i32
operand->type = t_invalid;
return false;
}
- if (x.value.value_integer.sign) {
+ if (big_int_is_neg(&x.value.value_integer)) {
error(call, "Negative array element length");
operand->mode = Addressing_Type;
operand->type = t_invalid;