How to convert ConstantInt* to value*?
Hi,
As can be seen on http://llvm.org/doxygen/classllvm_1_1ConstantInt.html , ConstantInt inherits directly from Value, so:
Value v = static_cast<Value>(ci);
Cheers,
James
Hi,
How to convert ConstantInt* to value*?
I guess you mean Value*. You don't have to. The ConstantInt
class is derived from the Constant class:
class ConstantInt : public Constant
The Constant class is derived from the User class:
class Constant : public User {
The User class is derived from the Value class:
class User : public Value {
Thus ConstantInt is derived from Value, and so you should be
able to pass a ConstantInt* where-ever a Value* is needed.
Ciao,
Duncan.