Lib/Target/instr/Instr.cpp
/**
 * Debug function - check for presence of zero-instructions in instruction sequence
 *
 */
Debug function - check for presence of zero-instructions in instruction sequence
Debug function - check for presence of zero - instructions in instruction sequence
void check_zeroes(Instr::List const &instrs) {
  bool success = true;
  for (int i = 0; i < instrs.size(); ++i ) {
    if (instrs[i].isZero()) {
      std::string msg = "Zero instruction encountered at position ";
      msg += std::to_string(i);
      warning(msg.c_str());
      success = false;
    }
  }
  if (!success) {
    error("zeroes encountered in instruction sequence", true);
  }
}
void check_zeroes ( Instr :: List const & instrs ) { bool success = true ; for ( int i = 0 ; i < instrs . size ( ) ; ++ i ) { if ( instrs [ i ] . isZero ( ) ) { std :: string msg = " " ; msg += std :: to_string ( i ) ; warning ( msg . c_str ( ) ) ; success = false ; } } if ( ! success ) { error ( " " , true ) ; } }
Debug function - check for presence of zero-instructions in instruction sequence
Debug function - check for presence of zero - instructions in instruction sequence
// Grumbl not working:  msg << i;