Lib/Support/InstructionComment.cpp
/**
 * Return comment as string with leading spaces
 *
 * NOTE: this does not take into account multi-line comments (don't occur at time of writing)
 *
 * @param instr_size  size of the associated instruction in bytes
 */
Return comment as string with leading spaces
NOTE: this does not take into account multi-line comments (don't occur at time of writing)

@param instr_size  size of the associated instruction in bytes
Return comment as string with leading spaces NOTE : this does not take into account multi - line comments ( don ' t occur at time of writing ) @param instr_size size of the associated instruction in bytes
std::string InstructionComment::emit_comment(int instr_size) const {
  if (m_comment.empty()) return "";
  const int COMMENT_INDENT = 60;
  int spaces = COMMENT_INDENT - instr_size;
  if (spaces < 2) spaces = 2;
  std::string ret;
  ret << tabs(spaces) << "# " << m_comment;
  return ret;
}
std :: string InstructionComment :: emit_comment ( int instr_size ) const { if ( m_comment . empty ( ) ) return " " ; const int COMMENT_INDENT = 60 ; int spaces = COMMENT_INDENT - instr_size ; if ( spaces < 2 ) spaces = 2 ; std :: string ret ; ret << tabs ( spaces ) << " " << m_comment ; return ret ; }
Return comment as string with leading spaces
 NOTE: this does not take into account multi-line comments (don't occur at time of writing)
Return comment as string with leading spaces NOTE : this does not take into account multi - line comments ( don ' t occur at time of writing )