Mustakim via llvm-dev
2019-Apr-29 14:05 UTC
[llvm-dev] How to change the source of a bitcast operator in a call instruction
Hi I am trying to write a llvm pass to set a call instruction target function to a different target. The call instruction looks like following: notail callvoidbitcast(void(i64, i64, i64)* @monitortovoid(i64, i8*, i64)*)(i642193551, i8*bitcast(i32(...)** @qcmptoi8*), i64%18), !dbg !25563 I want to replace target **monitor** to a different target **monitorA**. The callInst->setCalledFunction entirely remove the bitcast operator. The bitcast->setOperand(0, F) throws assert error. What should be the solution? Note: I am working on clang version 7.0.0 -- Email Signature Email Signature photograph *Mustakimur R. Khandaker * Graduate Research Assistant *p:*+1 850-999-3635 *e:*mrk15e at my.fsu.edu LOV-170, Department of Computer Science Florida State University ww2.cs.fsu.edu/~khandake/ <http://ww2.cs.fsu.edu/~khandake/> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190429/5900d8d8/attachment.html>