Remove iptrdiff and uptrdiff. Bump version to 0.3.100

This commit is contained in:
Christoffer Lerno
2022-11-17 23:44:54 +01:00
parent bbef94b0fd
commit da1a45f718
61 changed files with 125 additions and 142 deletions

View File

@@ -3524,10 +3524,10 @@ void llvm_emit_binary(GenContext *c, BEValue *be_value, Expr *expr, BEValue *lhs
{
if (lhs_type == rhs_type)
{
LLVMTypeRef int_type = llvm_get_type(c, type_iptrdiff);
LLVMTypeRef int_type = llvm_get_type(c, type_isz);
val = LLVMBuildSub(c->builder, LLVMBuildPtrToInt(c->builder, lhs_value, int_type, ""),
LLVMBuildPtrToInt(c->builder, rhs_value, int_type, ""), "");
val = LLVMBuildExactSDiv(c->builder, val, llvm_const_int(c, type_iptrdiff, type_abi_alignment(lhs_type->pointer)), "");
val = LLVMBuildExactSDiv(c->builder, val, llvm_const_int(c, type_isz, type_abi_alignment(lhs_type->pointer)), "");
break;
}
rhs_value = LLVMBuildNeg(c->builder, rhs_value, "");