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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] Function mangling for output parameters not working
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            HLSL
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          llvm-beanz
      </td>
    </tr>
</table>

<pre>
    There are a couple bugs related to mangling of output parameters. The Itanium ABI isn't including parameter mangling as expected, and the parameter types are not correctly mutated to references for template functions.

This test demonstrates both bugs: https://godbolt.org/z/oj1hEfjMv
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxkks9u3CwUxZ8Gb65iAbbH8cKLyZfPaqR01bwAmGubFIMFl2knT1_ZmnSqdoFgcf-cc36olOzsEXvWPLHmuVCZlhB75y7rg0blPwodzLV_WzAiqP3AGPLmEHSeE0R0itAABViVn531M4QJQqYtE2wqqhUJYyrhbUF4IeVtXuH89AI2eSZbAutHl83e97v6PkolwJ8bjoSGyf9AeQO04B-VdN0wHbp8IBhDjDiSu8Ka6VNXxAkj-hETTCEC4brtmmHKfiQbfCoZPzN-fltsAsJEYHANPlFUhAl0oOXwyqozLETb_mByYHKYg9HBURnizOTwweQQ3sXy__T-9VKYvjJd1akCe9HK9pHXTc2LpcfpNKnRaFFzbLQ-VaruHpt20vVJtKrqCttLLmvBuRBtLSUvBW-76lR3lZZGNZ1kNcdVWVfujPbdhU0pYy8EbwUvnNLo0oFTyi-v316ZlDvYT6a7k5o7myjdJ5Ald3yBo6F5huEWzh3Fnt0_WI_Uf4T43fq5yNH1fwVkacm6HMPK5LAvu10PWwzvOBKTw6E9MTnc5F96-SsAAP__ukbdpg">