X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FConstant.h;h=601b37bb64e4df165db1a12111b1d1d953de845f;hb=d6a49773ffbe35847baa7a68773ebbb326120dd0;hp=5f32ce0ac5e2cd7532820c08b2b08e0bce690138;hpb=8340d0b6595567375e80466fdcd277d5e190ed98;p=oota-llvm.git diff --git a/include/llvm/Constant.h b/include/llvm/Constant.h index 5f32ce0ac5e..601b37bb64e 100644 --- a/include/llvm/Constant.h +++ b/include/llvm/Constant.h @@ -43,18 +43,18 @@ class Constant : public User { Constant(const Constant &); // Do not implement protected: - Constant(const Type *ty, ValueTy vty, Use *Ops, unsigned NumOps) + Constant(Type *ty, ValueTy vty, Use *Ops, unsigned NumOps) : User(ty, vty, Ops, NumOps) {} void destroyConstantImpl(); public: /// isNullValue - Return true if this is the value that would be returned by /// getNullValue. - virtual bool isNullValue() const = 0; + bool isNullValue() const; /// isNegativeZeroValue - Return true if the value is what would be returned /// by getZeroValueForNegation. - virtual bool isNegativeZeroValue() const { return isNullValue(); } + bool isNegativeZeroValue() const; /// canTrap - Return true if evaluation of this constant could trap. This is /// true for things like constant expressions that could divide by zero. @@ -128,16 +128,16 @@ public: assert(0 && "Constants that do not have operands cannot be using 'From'!"); } - static Constant *getNullValue(const Type* Ty); + static Constant *getNullValue(Type* Ty); /// @returns the value for an integer constant of the given type that has all /// its bits set to true. /// @brief Get the all ones value - static Constant *getAllOnesValue(const Type* Ty); + static Constant *getAllOnesValue(Type* Ty); /// getIntegerValue - Return the value for an integer or pointer constant, /// or a vector thereof, with the given scalar value. - static Constant *getIntegerValue(const Type* Ty, const APInt &V); + static Constant *getIntegerValue(Type* Ty, const APInt &V); /// removeDeadConstantUsers - If there are any dead constant users dangling /// off of this constant, remove them. This method is useful for clients