[LLVMdev] An explanation to ConstantInt

Varun Agrawal varun729 at gmail.com
Sun Jan 20 15:32:25 PST 2013


Hi,

I am new to LLVM mailing list! Am I right in adding [LLVMdev] to the
subject? Or is it for some other purpose, I just saw that everyone does
that.

Here is my problem. I am running my program using JIT. Once the
program execution is complete, the control goes back to the program
which initiated the JIT. I want to know the value of one of the global
variables in my program.
Since the variable is a global variable, I can get the pointer to it using
the ExecutionEngine, and then obtain the value.

I see the hierarchy as:
GlobalVariable -> GlobalValue -> Constant
and
ConstantInt -> Constant

I can actually get the value of a ConstantInt variable using getValue().
I am getting confused with the nomenclature of Constant. Any
explanation for why it is called Constant?

Thanks
Varun Agrawal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130120/303d7488/attachment.html>


More information about the llvm-dev mailing list