Reputation: 21
I want to create a pass that will insert a function (that is in some c file) after every load instruction.I know how to insert a function with no arguments.But a function that also have argument. I am not able to insert that.How should i do that? Thanks in advance.
Upvotes: 0
Views: 84
Reputation: 273456
Use the CallInst::Create
static method. It takes an ArrayRef
of arguments. By grepping for this method call in the source of LLVM & Clang you can find many examples for using it.
Upvotes: 1