[LLVMdev] Inserting Calls to var args Functions
Manish Gupta
manishg at cs.ucsd.edu
Sun Aug 31 13:29:34 PDT 2014
Hi All,
I am using code similar to giri instrumentation
<https://github.com/liuml07/giri> framework to insert my instrumentation
code. It works for normal functions for example to insert recordInt32
function below.
void recordInt32(int32_t val){
printf("%d, ", val);
}
I can get recodedInt32 function in my Module using getOrInsert Function.
Function* RecordInt32 = cast<Function>(M.getOrInsertFunction("recordInt32",
VoidType,
Int32Type,
NULL));
and insert at desired instPoint using:
CallInst::Create(RecordInt32, args, "", instPoint);
What should be the similar instructions for recoedVarInsputValues below:
void recordVarInputValues(int num, ...){ CODE }
I am not able to figure out what will be the argument to
getOrInsertFunction for "...".
Thanks!
Manish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140831/51e5780b/attachment.html>
More information about the llvm-dev
mailing list