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...@@ -9386,21 +9386,21 @@ static TypeTableEntry *ir_analyze_bin_op_math(IrAnalyze *ira, IrInstructionBinOp
9386 if (is_signed_div) {9386 if (is_signed_div) {
9387 bool ok = false;9387 bool ok = false;
9388 if (instr_is_comptime(op1) && instr_is_comptime(op2)) {9388 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) {
9390 // the division by zero error will be caught later, but we don't have a9390 // the division by zero error will be caught later, but we don't have a
9391 // division function ambiguity problem.9391 // division function ambiguity problem.
9392 op_id = IrBinOpDivTrunc;9392 op_id = IrBinOpDivTrunc;
9393 ok = true;9393 ok = true;
9394 } else {9394 } else {
9395 BigInt trunc_result;9395 BigInt trunc_result;
9396 BigInt floor_result;9396 BigInt floor_result;
9397 bigint_div_trunc(&trunc_result, &op1->value.data.x_bigint, &op2->value.data.x_bigint);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);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) {9399 if (bigint_cmp(&trunc_result, &floor_result) == CmpEQ) {
9400 ok = true;9400 ok = true;
9401 op_id = IrBinOpDivTrunc;9401 op_id = IrBinOpDivTrunc;
9402 }9402 }
9403 }9403 }
9404 }9404 }
9405 if (!ok) {9405 if (!ok) {
9406 ir_add_error(ira, &bin_op_instruction->base,9406 ir_add_error(ira, &bin_op_instruction->base,
...@@ -9697,7 +9697,7 @@ static TypeTableEntry *ir_analyze_array_mult(IrAnalyze *ira, IrInstructionBinOp...@@ -9697,7 +9697,7 @@ static TypeTableEntry *ir_analyze_array_mult(IrAnalyze *ira, IrInstructionBinOp
9697 uint64_t old_array_len = array_type->data.array.len;9697 uint64_t old_array_len = array_type->data.array.len;
9698 uint64_t new_array_len;9698 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,
9701 (unsigned long long*)&new_array_len))9701 (unsigned long long*)&new_array_len))
9702 {9702 {
9703 ir_add_error(ira, &instruction->base, buf_sprintf("operation results in overflow"));9703 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...@@ -14396,7 +14396,7 @@ static TypeTableEntry *ir_analyze_instruction_fn_proto(IrAnalyze *ira, IrInstruc
14396 }14396 }
14397 }14397 }
14398 IrInstruction *param_type_value = instruction->param_types[fn_type_id.next_param_index]->other;14398 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))
14400 return ira->codegen->builtin_types.entry_invalid;14400 return ira->codegen->builtin_types.entry_invalid;
1440114401
14402 FnTypeParamInfo *param_info = &fn_type_id.param_info[fn_type_id.next_param_index];14402 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...@@ -279,7 +279,7 @@ ZigLLVMDIType *ZigLLVMCreateDebugUnionType(ZigLLVMDIBuilder *dibuilder, ZigLLVMD
279279
280ZigLLVMDIType *ZigLLVMCreateDebugStructType(ZigLLVMDIBuilder *dibuilder, ZigLLVMDIScope *scope,280ZigLLVMDIType *ZigLLVMCreateDebugStructType(ZigLLVMDIBuilder *dibuilder, ZigLLVMDIScope *scope,
281 const char *name, ZigLLVMDIFile *file, unsigned line_number, uint64_t size_in_bits,281 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,
283 ZigLLVMDIType **types_array, int types_array_len, unsigned run_time_lang, ZigLLVMDIType *vtable_holder,283 ZigLLVMDIType **types_array, int types_array_len, unsigned run_time_lang, ZigLLVMDIType *vtable_holder,
284 const char *unique_id)284 const char *unique_id)
285{285{
src/zig_llvm.hpp+1-1
...@@ -72,7 +72,7 @@ ZigLLVMDIType *ZigLLVMCreateDebugEnumerationType(ZigLLVMDIBuilder *dibuilder, Zi...@@ -72,7 +72,7 @@ ZigLLVMDIType *ZigLLVMCreateDebugEnumerationType(ZigLLVMDIBuilder *dibuilder, Zi
7272
73ZigLLVMDIType *ZigLLVMCreateDebugStructType(ZigLLVMDIBuilder *dibuilder, ZigLLVMDIScope *scope,73ZigLLVMDIType *ZigLLVMCreateDebugStructType(ZigLLVMDIBuilder *dibuilder, ZigLLVMDIScope *scope,
74 const char *name, ZigLLVMDIFile *file, unsigned line_number, uint64_t size_in_bits,74 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,
76 ZigLLVMDIType **types_array, int types_array_len, unsigned run_time_lang, ZigLLVMDIType *vtable_holder,76 ZigLLVMDIType **types_array, int types_array_len, unsigned run_time_lang, ZigLLVMDIType *vtable_holder,
77 const char *unique_id);77 const char *unique_id);
7878