parameters: (func_ir)
docstring: This checks that the IR presented is legal, warns and legalizes if not
docstring_summary: This checks that the IR presented is legal, warns and legalizes if not
docstring_tokens: This checks that the IR presented is legal warns and legalizes if not
function: def check_and_legalize_ir(func_ir):
      """
      This checks that the IR presented is legal, warns and legalizes if not
      """
      orig_ir = func_ir.copy()
      post_proc = numba.postproc.PostProcessor(func_ir)
      post_proc.run()
      msg = ("\nNumba has detected inconsistencies in its internal "
             "representation of the code at %s. Numba can probably recover from "
             "this problem and is attempting to do, however something inside "
             "Numba needs fixing...\n%s\n") % (func_ir.loc, feedback_details)
      if not func_ir.equal_ir(orig_ir):
          msg +=  func_ir.diff_str(orig_ir)
          warnings.warn(NumbaWarning(msg, loc=func_ir.loc))
function_tokens: def check_and_legalize_ir ( func_ir ) : orig_ir = func_ir . copy ( ) post_proc = numba . postproc . PostProcessor ( func_ir ) post_proc . run ( ) msg = ( "\nNumba has detected inconsistencies in its internal " "representation of the code at %s. Numba can probably recover from " "this problem and is attempting to do, however something inside " "Numba needs fixing...\n%s\n" ) % ( func_ir . loc , feedback_details ) if not func_ir . equal_ir ( orig_ir ) : msg += func_ir . diff_str ( orig_ir ) warnings . warn ( NumbaWarning ( msg , loc = func_ir . loc ) )