[llvm-dev] DIGlobalVariableExpression doc in langref

Peng Yu via llvm-dev llvm-dev at lists.llvm.org
Sun Jan 20 14:45:21 PST 2019


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


More information about the llvm-dev mailing list