[LLVMdev] cast instruction

Reid Spencer rspencer at reidspencer.com
Fri Feb 23 19:32:08 PST 2007

On Fri, 2007-02-23 at 21:09 -0600, Ryan M. Lefever wrote:
> I need to create a cast instruction that casts an sbyte* to another 
> pointer type.  Previously I was using the CastInst::createInferredCast() 
> function to do that; however, that function has been removed.  Which of 
> the create() functions from CastInst should I use to do that?  It seems 
> like the obdvious answer should be createPointerCast().  However, the 
> documentation for createPointerCast says, "Create a BitCast or a 
> PtrToInt cast instruction," and I'm not wanting to cast a pointer to an int.

Pointer to pointer cast is always a bit cast so just use "new


> Thanks,
> Ryan

More information about the llvm-dev mailing list