[llvm-dev] Replacing operands in a call instruction

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Thu Jan 23 12:32:48 PST 2020

Hi Abid,

On Thu, 23 Jan 2020 at 19:03, Abid Malik via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> I am trying to replace a pointer argument of a call instruction with another pointer argument( new argument value for the call instruction). What is the best way to do it? I could not find any hint/guidance on the web or LLVM manual.

You probably want CallBase::setArgOperand. You have to make sure the
types are the same of course, changing the type of an entity in LLVM
is substantially more involved.



More information about the llvm-dev mailing list