authorgravatar for thejoshwolfe@gmail.comJosh Wolfe <thejoshwolfe@gmail.com> 2017-09-01 10:27:04-07:00
committergravatar for thejoshwolfe@gmail.comJosh Wolfe <thejoshwolfe@gmail.com> 2017-09-01 10:27:04-07:00
log1449e71de87891757b35302a73f9f1ad03429030
treefb0703fcab71c3f7becde32f8060fedb238588d7
parent848504117f17a5fa8ead8c168e0e430e22be6e43

cleanup whitespace


3 files changed, 16 insertions(+), 16 deletions(-)

src/ir.cpp+14-14
......@@ -9386,21 +9386,21 @@ static TypeTableEntry *ir_analyze_bin_op_math(IrAnalyze *ira, IrInstructionBinOp
93869386 if (is_signed_div) {
93879387 bool ok = false;
93889388 if (instr_is_comptime(op1) && instr_is_comptime(op2)) {
9389 if (bigint_cmp_zero(&op2->value.data.x_bigint) == CmpEQ) {
9389 if (bigint_cmp_zero(&op2->value.data.x_bigint) == CmpEQ) {
93909390 // the division by zero error will be caught later, but we don't have a
93919391 // division function ambiguity problem.
93929392 op_id = IrBinOpDivTrunc;
9393 ok = true;
9394 } else {
9395 BigInt trunc_result;
9396 BigInt floor_result;
9397 bigint_div_trunc(&trunc_result, &op1->value.data.x_bigint, &op2->value.data.x_bigint);
9398 bigint_div_floor(&floor_result, &op1->value.data.x_bigint, &op2->value.data.x_bigint);
9399 if (bigint_cmp(&trunc_result, &floor_result) == CmpEQ) {
9400 ok = true;
9401 op_id = IrBinOpDivTrunc;
9402 }
9403 }
9393 ok = true;
9394 } else {
9395 BigInt trunc_result;
9396 BigInt floor_result;
9397 bigint_div_trunc(&trunc_result, &op1->value.data.x_bigint, &op2->value.data.x_bigint);
9398 bigint_div_floor(&floor_result, &op1->value.data.x_bigint, &op2->value.data.x_bigint);
9399 if (bigint_cmp(&trunc_result, &floor_result) == CmpEQ) {
9400 ok = true;
9401 op_id = IrBinOpDivTrunc;
9402 }
9403 }
94049404 }
94059405 if (!ok) {
94069406 ir_add_error(ira, &bin_op_instruction->base,
......@@ -9697,7 +9697,7 @@ static TypeTableEntry *ir_analyze_array_mult(IrAnalyze *ira, IrInstructionBinOp
96979697 uint64_t old_array_len = array_type->data.array.len;
96989698 uint64_t new_array_len;
96999699
9700 if (__builtin_umulll_overflow((unsigned long long)old_array_len, (unsigned long long)mult_amt,
9700 if (__builtin_umulll_overflow((unsigned long long)old_array_len, (unsigned long long)mult_amt,
97019701 (unsigned long long*)&new_array_len))
97029702 {
97039703 ir_add_error(ira, &instruction->base, buf_sprintf("operation results in overflow"));
......@@ -14396,7 +14396,7 @@ static TypeTableEntry *ir_analyze_instruction_fn_proto(IrAnalyze *ira, IrInstruc
1439614396 }
1439714397 }
1439814398 IrInstruction *param_type_value = instruction->param_types[fn_type_id.next_param_index]->other;
14399 if (type_is_invalid(param_type_value->value.type))
14399 if (type_is_invalid(param_type_value->value.type))
1440014400 return ira->codegen->builtin_types.entry_invalid;
1440114401
1440214402 FnTypeParamInfo *param_info = &fn_type_id.param_info[fn_type_id.next_param_index];
src/zig_llvm.cpp+1-1
......@@ -279,7 +279,7 @@ ZigLLVMDIType *ZigLLVMCreateDebugUnionType(ZigLLVMDIBuilder *dibuilder, ZigLLVMD
279279
280280ZigLLVMDIType *ZigLLVMCreateDebugStructType(ZigLLVMDIBuilder *dibuilder, ZigLLVMDIScope *scope,
281281 const char *name, ZigLLVMDIFile *file, unsigned line_number, uint64_t size_in_bits,
282 uint64_t align_in_bits, unsigned flags, ZigLLVMDIType *derived_from,
282 uint64_t align_in_bits, unsigned flags, ZigLLVMDIType *derived_from,
283283 ZigLLVMDIType **types_array, int types_array_len, unsigned run_time_lang, ZigLLVMDIType *vtable_holder,
284284 const char *unique_id)
285285{
src/zig_llvm.hpp+1-1
......@@ -72,7 +72,7 @@ ZigLLVMDIType *ZigLLVMCreateDebugEnumerationType(ZigLLVMDIBuilder *dibuilder, Zi
7272
7373ZigLLVMDIType *ZigLLVMCreateDebugStructType(ZigLLVMDIBuilder *dibuilder, ZigLLVMDIScope *scope,
7474 const char *name, ZigLLVMDIFile *file, unsigned line_number, uint64_t size_in_bits,
75 uint64_t align_in_bits, unsigned flags, ZigLLVMDIType *derived_from,
75 uint64_t align_in_bits, unsigned flags, ZigLLVMDIType *derived_from,
7676 ZigLLVMDIType **types_array, int types_array_len, unsigned run_time_lang, ZigLLVMDIType *vtable_holder,
7777 const char *unique_id);
7878