Lib/Target/instr/Instr.cpp
/**
 * Generates a string representation of the passed string of instructions.
 */
Generates a string representation of the passed string of instructions.
Generates a string representation of the passed string of instructions .
std::string Instr::List::mnemonics(bool with_comments) const {
  std::string prefix;
  std::string ret;
  for (int i = 0; i < size(); i++) {
    auto const &instr = (*this)[i];
    prefix.clear();
    prefix << i << ": ";
    ret << instr.mnemonic(with_comments, prefix).c_str() << "\n";
  }
  return ret;
}
std :: string Instr :: List :: mnemonics ( bool with_comments ) const { std :: string prefix ; std :: string ret ; for ( int i = 0 ; i < size ( ) ; i ++ ) { auto const & instr = ( * this ) [ i ] ; prefix . clear ( ) ; prefix << i << " " ; ret << instr . mnemonic ( with_comments , prefix ) . c_str ( ) << " \n " ; } return ret ; }
Generates a string representation of the passed string of instructions.
Generates a string representation of the passed string of instructions .