search for: voidptrti

Displaying 6 results from an estimated 6 matches for "voidptrti".

Did you mean: voidptrty
2008 Nov 17
2
[LLVMdev] Assertion `castIsValid(getOpcode(), S, Ty) && "Illegal BitCast"' failed.
ok.. So I am trying out what you have suggested. I have written the below code which basically tries to write the constant 10 to a file. myprint is a function pointer to a function which takes char * parameter and writes it to file. Value *Ten = ConstantInt::get(Type::Int32Ty, 10); const Type *VoidPtrTy = PointerType::getUnqual(Type::Int8Ty); AllocaInst *AI = new AllocaInst(Type::Int32Ty); Value
2008 Nov 17
1
[LLVMdev] Assertion `InReg && "Value not in map!"' failed
Ah! I get it now. Thanks a lot ! I changed it to BitCastInst(AI,VoidPtrTy,"",j); And now I am getting the following error :(. I have been stuck with this error before also. I know I am missing out something silly. What is the cause of this error and Please let me know how to fix it. /home/bhavani/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1130: llvm::SDOperand
2008 Nov 17
1
[LLVMdev] Assertion `InReg && "Value not in map!"' failed
Thanks Nick! ok. I ran through the verifier and this is the issue: verifying... Instruction does not dominate all uses! %tmp3 = add i32 %b, %a ; <i32> [#uses=2] store i32 %tmp3, i32* %0, align 4 Broken module found, compilation aborted! add is existing instruction in function. store is the instruction I have added to the function. How do I fix this now :(? Thanks, Bhavani --- On Mon,
2014 Jun 27
2
[LLVMdev] how create a pointer to FILE*
Hi, all I want to create a function in LLVM IR, whose type is: void _to_prof( FILE* ptrF); I do it within LLVM, but I don't know how build the parameter type for FILE* ptrF. Best Regards. Eric Lu -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140627/c49bdb2a/attachment.html>
2008 Nov 17
0
[LLVMdev] Assertion `InReg && "Value not in map!"' failed
ok 1 last question for the day... I created a function in C. void writeToFile(char *str) { FILE *f; if((f=fopen("example","a"))==NULL){ printf("could not open file"); } else{ fprintf(f,str); fclose(f);} } used this to create .bc then using llc -march=cpp I got the cpp code to create this function. While instrumenting my code, I place call to this function.
2008 Nov 17
0
[LLVMdev] Assertion `castIsValid(getOpcode(), S, Ty) && "Illegal BitCast"' faile
ok.. you are right. I had not inserted the AllocaInst in the function. Thanks a lot for solving my problem yet again :) --- On Mon, 11/17/08, Eli Friedman <eli.friedman at gmail.com> wrote: > From: Eli Friedman <eli.friedman at gmail.com> > Subject: Re: Assertion `castIsValid(getOpcode(), S, Ty) && "Illegal BitCast"' faile > To: bhavi63 at yahoo.com