[LLVMdev] Dynamic Creation of a simple program

Misha Brukman brukman at uiuc.edu
Tue Mar 15 20:46:48 PST 2005


On Tue, Mar 15, 2005 at 07:28:58PM -0800, xavier wrote:
> But I tried your code instead of the lines above:
> 
> GetElementPtrInst *GEP = 
>   new GetElementPtrInst(mi, // %tmp.0
>                         ConstantSInt::get(Type::IntTy, 0),
>                         ConstantUInt::get(Type::UIntTy, 1),
>                         "tmp.3", BBlock);
>   
> Since the malloc the first instruction, I don't want to insert the
> getelementptr before it, so I used the basic block instead. It keeps
> giving me segmentation faults.

Please post the assertion failure and/or backtrace, or alternatively,
send me your code offline.

-- 
Misha Brukman :: http://misha.brukman.net :: http://llvm.cs.uiuc.edu




More information about the llvm-dev mailing list