[LLVMdev] How to instrument a this function using insertBefore instruction???
glider at google.com
Mon Apr 9 04:19:35 CDT 2012
You'll need to declare the function in a separate module, not in the
That module needs to be compiled independently and linked to the
program instrumented by your pass.
In order to add a function declaration to the program, use getOrInsertFunction()
You may want to have a look at how AddressSanitizer works
it does essentially the same.
More information about the LLVMdev