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

    <tr>
        <th>Summary</th>
        <td>
            Fix unwind registration for multiple JIT instances in a single process. (2nd attempt)
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    /cherry-pick 84fe1f63b02414085bf7a8434caaf4a358be86da 9f61a60c777465c8a1bb67f80560a9e3b4d0f05b

This is the fix for https://github.com/llvm/llvm-project/issues/126611. It only affects ORC, and only changes behavior when used with libunwind (so primarily on Darwin and BSD, but some Linux clients too).

This issue supersedes https://github.com/llvm/llvm-project/issues/126824, and includes a follow-up patch to fix an unused variable warning.


</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJykks1q5DoQhZ9G3hRpZFn-W3iRHxpyuXDhTl6gJJdtzaglo5K6028_dCdhmHVWAi0O9Z3vILNbA9Ek2ifRvlRY8hbT5Dc8EVcmztdJqKPdKKXrw-7sLxj0QvXSNUYqXWs5tGbpcdCNtoiLxqYdDA3djDAuXY2dtH3f6661A9bGdP0yyLaTOFJj9CwX2RohH4V8fNscg2PIG8Hi3mGJCbacdxbNo1BHoY6ry1sxBxtPQh29P389D3uKP8lmoY6OuRALdaxV19X1AV4zxOCvgMtCNjP89_-zUM-AYf74txuGlRgMbXh2McFlowCFaYaLyxt4Z0q4uDCDUANH2JM7YXL-CjHAC6aLC_ewpx8vt1xTMnA8EfzrQnkH6x2FzJBjFGo8_AXKhYDLTolpJv4e6qD0F5UL1pdbIMISvY-Xh7LDjtlukOO9WAxQwp3wjMmh8QQXTMGF9fPAap6aeWxGrGiq-2ZsVN2qsdom3ejeYt2MNZm5U9aaYcGhx7a19axHU7lJSdVKVSspWyXHA2k5y57MrDo9KNMILemEzh9uMIeY1uqOMd0YGll5NOT5PkWlAl0-ahJK3ZaZpnsDpqwstPSOM_-JyS57mo7uHT51JVod54TZxXDf0qn47HZP8M_rG7jAGYMlhps_YBdWT7CnaIn5cHOtwgyYM532LNRYleSn7ylqZHWe1O8AAAD__6jvHhk">