<div dir="ltr">The difficulty is that the IR verifier and various assertions in the codebase care about identity-equality, not just structural equality and it's not always obvious which usage patterns are going to lead to verification failures, aside from the traditional compilation model of building separate modules and linking them together at the end. <br><br>I may look at doing that instead since it seems like that is must better supported/tested, but I'd be concerned about the additional overhead of extra linking steps.<br><br>I can add bitcasts by trial and error, but it seems like to be confident that I'm not going to produce invalid code I'd essentially need to bitcast all function arguments anytime I call a function that has been sent through the linker. Is that it, more or less?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 2 May 2016 at 05:42, Rafael EspĂ­ndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> I get that it's an open-source project and use-cases only get supported if someone contributes time, so I'm trying to help here. The change makes the code simpler, internally consistent and fixes a use case that previously worked.<br>
><br>
> Are you just saying that IRMover is only meant to work for the particular use-case of the LLVM linker and other people who are trying to use it as a utiltiy to move IR between modules just need to deal with it?<br>
<br>
</span>Not necessarily, but the invariant you are trying to support is not<br>
the direction we are trying to move. In fact, it is the opposite. You<br>
are trying to say that if there is a type with a given name in the<br>
destination it will be safe to assume it will be use when linking in<br>
code.<br>
<br>
The direction we are trying to move to is that types are non recursive<br>
and always structurally merged.<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div>