When not destroying the source, the linker is not remapping the types. Added support
[oota-llvm.git] / include / llvm / Constant.h
index 5e351c4ec504cfb5e64b2c4fb542aec4ac5b1dc0..3ce8d2c243eb673f46fa1fbe108ba842813cfab8 100644 (file)
@@ -41,9 +41,10 @@ namespace llvm {
 class Constant : public User {
   void operator=(const Constant &);     // Do not implement
   Constant(const Constant &);           // Do not implement
+  virtual void anchor();
   
 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();
@@ -52,6 +53,10 @@ public:
   /// getNullValue.
   bool isNullValue() const;
 
+  /// isAllOnesValue - Return true if this is the value that would be returned by
+  /// getAllOnesValue.
+  bool isAllOnesValue() const;
+
   /// isNegativeZeroValue - Return true if the value is what would be returned 
   /// by getZeroValueForNegation.
   bool isNegativeZeroValue() const;
@@ -128,16 +133,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