[LLVMdev] Converting a Constant GEP to a POD integer?

Talin viridia at gmail.com
Sat Sep 18 14:35:05 PDT 2010


On Sat, Sep 18, 2010 at 12:24 PM, Duncan Sands <baldrick at free.fr> wrote:

> Hi Talin,
>
> > This is all happening at link time, which means that the target machine
> is fully
> > known by this point. So it ought to be possible to convert the field
> offset
> > expression (including the constant GEP) into a plain integer. Any idea
> how to do
> > this?
>
> probably you can just run the constant folder on it (passing the target
> data to
> the constant folder).
>

Ah, that worked. Thanks!

>
> Ciao,
>
> Duncan.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



-- 
-- Talin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100918/0737bfff/attachment.html>


More information about the llvm-dev mailing list