// Specialize setName to handle symbol table majik...
virtual void setName(const std::string &name, SymbolTable *ST = 0);
- virtual std::string getStrValue() const = 0;
-
// Static constructor to get a '0' constant of arbitrary type...
static Constant *getNullConstant(const Type *Ty);
// inverted - Return the opposite value of the current value.
inline ConstantBool *inverted() const { return (this==True) ? False : True; }
- virtual std::string getStrValue() const;
inline bool getValue() const { return Val; }
// isNullValue - Return true if this is the value that would be returned by
public:
static ConstantSInt *get(const Type *Ty, int64_t V);
- virtual std::string getStrValue() const;
-
static bool isValueValidForType(const Type *Ty, int64_t V);
inline int64_t getValue() const { return Val.Signed; }
public:
static ConstantUInt *get(const Type *Ty, uint64_t V);
- virtual std::string getStrValue() const;
-
static bool isValueValidForType(const Type *Ty, uint64_t V);
inline uint64_t getValue() const { return Val.Unsigned; }
public:
static ConstantFP *get(const Type *Ty, double V);
- virtual std::string getStrValue() const;
-
static bool isValueValidForType(const Type *Ty, double V);
inline double getValue() const { return Val; }
static ConstantArray *get(const ArrayType *T, const std::vector<Constant*> &);
static ConstantArray *get(const std::string &Initializer);
- virtual std::string getStrValue() const;
inline const ArrayType *getType() const {
return (ArrayType*)Value::getType();
}
static ConstantStruct *get(const StructType *T,
const std::vector<Constant*> &V);
- virtual std::string getStrValue() const;
inline const StructType *getType() const {
return (StructType*)Value::getType();
}
inline ConstantPointer(const PointerType *T) : Constant((const Type*)T){}
~ConstantPointer() {}
public:
- virtual std::string getStrValue() const = 0;
inline const PointerType *getType() const {
return (PointerType*)Value::getType();
}
inline ConstantPointerNull(const PointerType *T) : ConstantPointer(T) {}
inline ~ConstantPointerNull() {}
public:
- virtual std::string getStrValue() const;
static ConstantPointerNull *get(const PointerType *T);
public:
static ConstantPointerRef *get(GlobalValue *GV);
- virtual std::string getStrValue() const;
-
const GlobalValue *getValue() const {
return cast<GlobalValue>(Operands[0].get());
}