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

    <tr>
        <th>Summary</th>
        <td>
            Type comparisons for two values always returns false when modules are linked
        </td>
    </tr>

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

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

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

<pre>
    If you want to compare types from different contexts, an int64 from one LLVMContext differs from int64 from another LLVMContext, which seems to intended, but the problem I'm facing is that even after linking Modules with `Linker::linkModules`.

I have the two values from two different modules that I then link together. They still consider each other different, and I cannot make any type comparisons anymore. Shouldn't the context for types and values also be moved from the source module to the destination while linking? If not, what other solutions are there?

Where linking modules happens: https://github.com/alinalihassan/Lesma/blob/main/src/liblesma/Backend/Codegen.cpp#L202

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9Uk2PmzAQ_TVwGRUBAZIcOOxmFSlS9tRVex7wENw1NrJN0vz7joHsbnuoBNjM53tvpjHiXp86uJsJbqg9eAOtGUa0BP4-koPOmgGE7DqyxP7WaE-_vYvyA6AGqX1VLDFGE5zPP14PS8Sasxb4Eofa-J7s19hQ7NbLtgdHNLgAghNICxLB1UyMqycYrWkUDXCK8u0AHbZSX0ByeI8e6EoasPNcWUn9HlyvRkyKKdyk7yGq0jPbyUabJ35CzOpnTxKlL1H6tHxP0OOV5o7-ZuCKanroEP4_tRjW-nP_U0jQc2_Gf6HAMYG3nu7gvFQqKOekYHiETHTR4KPWIqfgKi1qFggGfCe23OcprCORjksE42AsJfC9N5MSmsVY5FlHA52x6-xCxRU-KmegIcZ8JbGS4RxnJtvSyiToHoyCGLFGL40OY2HHqmi0OQIvC-NbJsa0Fx7OqCmEcx87K2eJY7-K-jPYPibzUK7HcSTteB7Qez-GS5Qf-bnwyKYmYd78g5zGb4_OIdM9nskNyGejTMPHgDJYnW35qySvyOJ-xvadd4hvByPoQjppxzHKN-c8zRdQMdVZVWVFVmZpHot6I_abPcZeekX127_Cz7p-LgSqG94dWPKTDV5WmFgT3oEHO1wZk4gnq-r_MFTq-ji-8Zb_opYVPkrnuBFfyu2mLOO-3hUNigzztNtmVV4U1a4oul2TE2KRFZs8VtiQcnVUPkflSyxrZpqnu7xMd1lW5InY7nYViX0qmmaPlEVFSqyeSkLjxNhLbOsZQzNdHDuVdN59Oll_edFEj_o4-d7Y-q_xxDPoekb8By0Hf3M">