[LLVMdev] GlobalValue Type

John Criswell criswell at illinois.edu
Wed Oct 19 11:31:32 PDT 2011


On 10/19/11 1:17 PM, shreyas krishnan wrote:
> Hi
>      I am wondering why the following variable  has  a PointerTy.
>
> @foo.data = internal addrspace(3) global float 5.000000e+000, align 4
>
> When I do a V->getType()->dump() on the variable its printed as
>
> float addrspace(3)*

A Global is globally allocated memory.  @foo.data is a pointer to that 
globally allocated memory: http://llvm.org/docs/LangRef.html#globalvars

-- John T.

>
>
> thanks
> 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