search for: fcall2

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

Did you mean: fcall
2010 Nov 23
2
[LLVMdev] how to get a void type value in llvm
Hi, I want to insert a function with a void type parameter, for example: int foo(void); OI declared fcall2 = M.getOrInsertFunction("foo", IntegerType::get(M.getContext(), 32), Type::getVoidTy(M.getContext())); then the question is how to get the void type value to make the CallInst inserted sucessfully? (what should be ********) CallInst::Create(fcall2, ******, "", ins...
2010 Nov 23
1
[LLVMdev] how to get a void type value in llvm
Hi, sivart Thanks for pointing it out. I used it, and it works. Thank you again. BTW, for any later reference, the function prototype declaration with no arguments is not what I wrote: fcall2 = M.getOrInsertFunction("foo", IntegerType::get(M.getContext(), 32), Type::getVoidTy(M.getContext())); INSTEAD, I changed to : fcall2 = M.getOrInsertFunction("foo", FunctionType::get( IntegerType::get(M.getContext(), 32), false)); combining with this, the insertion wor...
2010 Nov 23
0
[LLVMdev] how to get a void type value in llvm
...n arguments: static CallInst* llvm::CallInst::Create ( Value * F, const Twine & NameStr, BasicBlock * InsertAtEnd); Regards On 23/11/2010, at 11:20 AM, Shuying Liang wrote: > Hi, I want to insert a function with a void type parameter, > for example: int foo(void); > OI declared > fcall2 = M.getOrInsertFunction("foo", > IntegerType::get(M.getContext(), 32), > Type::getVoidTy(M.getContext())); > > then the question is how to get the void type value to make the > CallInst inserted sucessfully? (what should be ********) > CallInst::Create(fca...