search for: nretty

Displaying 3 results from an estimated 3 matches for "nretty".

Did you mean: pretty
2008 Sep 13
3
[LLVMdev] Duplicate Function with duplicated Arguments
I'm now writing a pass and I wanna ask a question about how to duplicate the function and add duplicated arguments in llvm, for example: func(int a, char *b) -> func(int a, char *b, int a1, char *b1) I'm now stuck at using "getOrInsertFunction" and how to handle "getArgumentList", please share your opinion, thanks a lot! James
2011 Sep 16
2
[LLVMdev] How to duplicate a function?
...= ConstantInt::get(Type::getInt32Ty(F.getContext()), 333); // create and insert the function call //CallInst::Create(f, param, "", nextInstr); CallInst::Create(Fn, param, "", nextInstr); // indicates that we changed the code //return true; #endif Type *NRetTy; std::vector<Type*> Params(FTy->param_begin(), FTy->param_end()); FunctionType *NFTy = FunctionType::get(FTy->getReturnType(), Params, false); // Create the new function body and insert it into the module... Function *NF = Function::Create(NFTy, Fn->getLinkage())...
2011 Sep 16
0
[LLVMdev] How to duplicate a function?
...= ConstantInt::get(Type::getInt32Ty(F.getContext()), 333); // create and insert the function call //CallInst::Create(f, param, "", nextInstr); CallInst::Create(Fn, param, "", nextInstr); // indicates that we changed the code //return true; #endif Type *NRetTy; std::vector<Type*> Params(FTy->param_begin(), FTy->param_end()); FunctionType *NFTy = FunctionType::get(FTy->getReturnType(), Params, false); // Create the new function body and insert it into the module... Function *NF = Function::Create(NFTy, Fn->getLinkage())...