search for: strcpyname

Displaying 4 results from an estimated 4 matches for "strcpyname".

2009 Apr 14
3
[LLVMdev] InstVisitor Example
...to know how to use InstVisitor for other purposes, you > just derive a class from the InstVisitor template, and overload the > visit routines that you want. > > class StrcpyVisitor : public InstVisitor<StrcpyVisitor> { > void handleStrcpy(CallSite strcpy); > string strcpyName; > public: > void visitCallInst(CallInst& call) { > if (call.getName() == strcpyName) > handleStrcpy(&call); > } > void visitInvokeInst(InvokeInst& invoke) { > if (call.getName() == strcpyName) > handleStrcpy(&invoke...
2009 Apr 14
0
[LLVMdev] InstVisitor Example
.... } If you want to know how to use InstVisitor for other purposes, you just derive a class from the InstVisitor template, and overload the visit routines that you want. class StrcpyVisitor : public InstVisitor<StrcpyVisitor> { void handleStrcpy(CallSite strcpy); string strcpyName; public: void visitCallInst(CallInst& call) { if (call.getName() == strcpyName) handleStrcpy(&call); } void visitInvokeInst(InvokeInst& invoke) { if (call.getName() == strcpyName) handleStrcpy(&invoke); } }; Then, you proba...
2009 Apr 14
2
[LLVMdev] InstVisitor Example
I just read the LLVM Programmer's Manual, which mentions (but specifically does not include any details of) the InstVisitor template. Could someone please provide an example of how to use this template to find (as an example) all CallSites for the function strcpy? Thanks, Brice Lin
2009 Apr 14
0
[LLVMdev] InstVisitor Example
...isitor for other purposes, you >> just derive a class from the InstVisitor template, and overload the >> visit routines that you want. >> >>   class StrcpyVisitor : public InstVisitor<StrcpyVisitor> { >>     void handleStrcpy(CallSite strcpy); >>     string strcpyName; >>    public: >>     void visitCallInst(CallInst& call) { >>       if (call.getName() == strcpyName) >>         handleStrcpy(&call); >>     } >>     void visitInvokeInst(InvokeInst& invoke) { >>       if (call.getName() == strcpyName) >>...