[llvm-dev] DIGlobalVariableExpression doc in langref

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 21 15:03:16 PST 2019

I don't have an example from C code, but here's one from LLVM IR:

On Sun, Jan 20, 2019 at 2:45 PM Peng Yu <pengyu.ut at gmail.com> wrote:

> Hi David,
> > If an expression is involved, that expression (possibly along with the
> underlying LLVM IR global variable) is used to compute the value of the
> source level global variable. (in the example you have - there may not be
> any LLVM IR global variable at all - just the expression computing the
> constant value of the source level global variable - but in other cases,
> say if a big constant that only holds a few different values is optimized
> into a lookup table (rather than storing a big integer, just store 0 or 1,
> if it's 0 that means teh value is XXXXXXX, if the value is 1 that means the
> value is YYYYYY) it might be a combination, using the LLVM IR global
> variable to compute the source level value)
> Do you have an example minimal .c file that can demonstrate this in
> action? This will make it easier to understand what you mean.
> --
> Regards,
> Peng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190121/5642f745/attachment.html>

More information about the llvm-dev mailing list