<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/101408>101408</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            llvm/utils/TableGen/Common/CodeGenRegisters.h:571: clumsy parameter passing ?
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            tablegen,
            code-quality
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          dcb314
      </td>
    </tr>
</table>

<pre>
    Static analyser cppcheck says:

llvm/utils/TableGen/Common/CodeGenRegisters.h:571:26: performance: Function parameter 'Name' should be passed by const reference. [passedByValue]

Source code is

  RegUnitSet(std::string Name) : Name(Name) {}

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykkk-PmzAQxT_NcLE2MmOIycGHZCN662G37d2YCbg1mPrPSnz7yknU7r0XNMxI896bn3WMdlqJFLQXaK-Vzmn2QY1mEHVTDX7c1XvSyRqmV-32SIGZbTMzmV8s6j2COAO_An9-nftYAPucrIuA_Tc9OPpCK2D_6pfFP4qxtN5osjFRiIcZxLmVNYgzHkGc2Ubh5sOiV0Plt8-rSdavbNNBL5QoMED5VS8EKFmcfXYjG4htOkYa2bAz49eYWKAbBVoNHRi0l8f0sv_QLhO018-m330OhpjxIzEbP08Ye6Pp-2rTOyXALqax5BXnmIJdJ_YwcWLF5qPu_rbkBeRTpRqVGE_ipCtStURs2q7hx2pWx5uWKFvsuiMN4tRJUbeINzNwybGWp8oq5NhwKWrkDefHw6nRnRD1kW6GN5pqaDgt2rpDOfzBh6myMWZSNa8b3lVOD-TinS1iKjCmAgMBXwGxBH75nbWzaS_N9loFVRa9DHmK0HBnY4r_ViebHKn_Q8yMy0vcP8EsZMoxQfRVDk7NKW33Z4U9YD_ZNOfhYHzRfErfLW7B_ySTAPt74mLlGfpD4Z8AAAD__wd74ww">