marcchellarmani at email.biz
2013-Dec-03 03:04 UTC
[LLVMdev] Help needed with creating new and replacing an old instruction
<div><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <div>Hi,</div><div><br></div><div>I have the following instruction in my IR-</div><div><b>%call2 = call i8* @strcpy(i8* %1, i8* %2)</b> #2</div><div><br></div><div>I intend to change call to strcpy with strncpy. I have included the following code in runOnFunction, so that when it is strcpy's turn to be invoked, strncpy is invoked instead.</div><div><br></div><div>Assuming I* is the strcpy instruction,</div><div><br></div><div><b>CallInst* x=new CallInst::CreateCall3(strncpy,1,2,ConstantInt(16),"my_strncpy");</b></div><div><b>ReplaceInstWithInst(I*,x);</b></div><div><br></div><div>I'm running into a whole bunch of errors in CreateCall3(). How can I go about writing this correctly?</div><div><br></div><div>Any help would be appreciated.</div><div><br></div><div>Thanks.</div><div>Marc</div><div style="color:#aaaaaa;margin-top:10px;padding:10px 10px 10px 0;">----<br></div><div style="background: none repeat scroll 0 0 #F1F1F1;border: 1px solid #E9E9E9;border-radius: 2px 2px 2px 2px;color:#111111;padding:10px;margin-top:10px;"><a href="https://www.email.biz">email.biz </a> access any email create any email</div><br> </div> <br> <div style='color:#aaaaaa;margin-top:10px;padding:10px 10px 10px 0;'><br/></div><br/><div style='background: none repeat scroll 0 0 #F1F1F1;border: 1px solid #E9E9E9;border-radius: 2px 2px 2px 2px;color:#111111;padding: 10px;margin-top:10px;'><a href='https://www.email.biz'>email.biz </a> access any email create any email</div><br/>
Maybe Matching Threads
- [LLVMdev] Help needed with creating new and replacing an old instruction
- [LLVMdev] Help with creating and replacing instructions in LLVM
- [PATCH server] UI tweaks for cloud
- string overflow in rpcclient add "printer" driver command
- Friend request from kc0ccb@hotmail.com