[LLVMdev] creating pointer type

John Criswell criswell at uiuc.edu
Tue Jun 1 21:11:24 PDT 2010


shreyas krishnan wrote:
> HI
>    I need to create a pointer type to a global array which is
>
> @buf  = internal constant [4 x i32] zeroinitializer ; <[4 x i32]*> [#uses=0]
>   

The @buf SSA value is already a pointer type (it points to an array of 4 
32-bit integers).  All globals in LLVM are pointers to global data.

-- John T.

>
> if I just dyncast it, the element type of the resultant pointer type
> is not set properly.
>
> The getUnqual method gives me a double pointer.
>
>
> thanks for the help !
> shrey
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>   




More information about the llvm-dev mailing list