Skip to content

Commit

Permalink
Apply suggestions from @czgdp1807
Browse files Browse the repository at this point in the history
  • Loading branch information
namannimmo10 authored and certik committed Jun 21, 2022
1 parent bbbd3ab commit 03e0133
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/libasr/asr_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ bool is_op_overloaded(ASR::binopType op, std::string& intrinsic_op_name,
break;
}
default: {
throw LFortranException("Binary operation not supported yet");
throw LFortranException("Binary operator '" + ASRUtils::binop_to_str(op) + "' not supported yet");
}
}
if( result && curr_scope->get_symbol(intrinsic_op_name) == nullptr ) {
Expand Down
9 changes: 6 additions & 3 deletions src/libasr/codegen/asr_to_llvm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3259,7 +3259,8 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>
break;
};
default: {
throw CodeGenError("Binary operation not supported yet", x.base.base.loc);
throw CodeGenError("Binary operator '" + ASRUtils::binop_to_str(x.m_op) + "' not supported yet",
x.base.base.loc);
}
}
}
Expand Down Expand Up @@ -3309,7 +3310,8 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>
break;
};
default: {
throw CodeGenError("Binary operation not supported yet", x.base.base.loc);
throw CodeGenError("Binary operator '" + ASRUtils::binop_to_str(x.m_op) + "' not supported yet",
x.base.base.loc);
}
}
}
Expand Down Expand Up @@ -3377,7 +3379,8 @@ class ASRToLLVMVisitor : public ASR::BaseVisitor<ASRToLLVMVisitor>
break;
};
default: {
throw CodeGenError("Binary operation not supported yet", x.base.base.loc);
throw CodeGenError("Binary operator '" + ASRUtils::binop_to_str(x.m_op) + "' not supported yet",
x.base.base.loc);
}
}
tmp = lfortran_complex_bin_op(left_val, right_val, fn_name, type);
Expand Down
2 changes: 1 addition & 1 deletion src/libasr/codegen/asr_to_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ class ASRToX86Visitor : public ASR::BaseVisitor<ASRToX86Visitor>
break;
};
default: {
throw CodeGenError("Binary operation not supported yet");
throw CodeGenError("Binary operator '" + ASRUtils::binop_to_str(x.m_op) + "' not supported yet");
}
}
}
Expand Down

0 comments on commit 03e0133

Please sign in to comment.