[LLVMdev] Find size of memory pointer is pointing to

Duncan Sands baldrick at free.fr
Mon Nov 12 01:58:40 PST 2012


Hi Sunil, you can do this using the routines in llvm/Analysis/MemoryBuiltins.h.

Ciao, Duncan.

On 11/11/12 21:19, sunil rathee wrote:
> Hi,
> Can we find the size of memory a pointer is pointing to in LLVM. For example
> type *p = (type *)malloc(sizeof(type)*20);
> then it should give us size as sizeof(type) * 20.
>
> --
> Sunil Rathee
> MTech
> IIT Delhi
>
> Not going along with the crowd can help you stand out in the crowd
>
>
>
> _______________________________________________
> 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