I'm experimenting with "replaceAllUsesWith" and I see that it requires that the replacement be the same type.<div><br></div><div>Here's what I am trying to do: Say I have a global variable A whose type is [10 x Foo]. The only references to A are via GEPs which get a pointer to the first element: GEP(A, 0, 0), so in other words no user of A knows the length of the array from the type.</div>
<div><br></div><div>Now I want to replace A with A', which is exactly the same except that it has a different array length. I want to remove all references to the original A. I can't use replaceAllUsesWith, because A and A' have different types.</div>
<div><br>-- <br>-- Talin<br>
</div>