Code will compile as 32 bit but will causes errors in the linker on Windows

This commit is contained in:
Ginger Bill
2017-06-19 15:55:09 +01:00
parent 178236d1ff
commit 5427d14416
11 changed files with 674 additions and 622 deletions
+11
View File
@@ -2262,6 +2262,17 @@ irValue *ir_emit_comp(irProcedure *proc, TokenKind op_kind, irValue *left, irVal
left = ir_emit_conv(proc, left, ir_type(right));
} else if (right->kind == irValue_Constant || right->kind == irValue_Nil) {
right = ir_emit_conv(proc, right, ir_type(left));
} else {
gbAllocator a = proc->module->allocator;
i64 ls = type_size_of(a, ir_type(left));
i64 rs = type_size_of(a, ir_type(right));
if (ls < rs) {
left = ir_emit_conv(proc, left, ir_type(right));
} else if (ls > rs) {
right = ir_emit_conv(proc, right, ir_type(left));
} else {
right = ir_emit_conv(proc, right, ir_type(left));
}
}
Type *result = t_bool;