[llvm-dev] Type unmatched after replacing functions

Will Lester via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 19 05:55:29 PDT 2019


On Thu, Sep 19, 2019 at 5:01 PM Tim Northover <t.p.northover at gmail.com> wrote:
>
> On Thu, 19 Sep 2019 at 09:45, Will Lester <hslester96 at gmail.com> wrote:
> > > Are you trying to be more selective than Value::replaceAllUsesWith
> > > would allow for some reason?
> >
> > I'm very glad to select another way if there is a better one. :)
>
> OK, then it sounds like that might be exactly what you need:
> replaceAllUses of the function you're discarding with an appropriately
> casted version of the new function. It automatically rebuilds any
> Constant users it finds.
>

Thank you, this simple method solves the problem perfectly!

Furthermore, I feel excited to receive your reply since last year your
advice also helped me a lot.
It is fortunate to be helped by you again :)

Regards,
Will

> Cheers.
>
> Tim.


More information about the llvm-dev mailing list