Cosmetic change.
[oota-llvm.git] / include / llvm / Constant.h
index 985f1908dab70e636839bf6513913763ffe54967..d925fdb618ed96871847dcb0c9473d2dbea03478 100644 (file)
@@ -48,6 +48,11 @@ public:
   ///
   static Constant *getNullValue(const Type *Ty);
 
+  /// Static constructor to get a '-1' constant.  This supports integers and
+  /// vectors.
+  ///
+  static Constant *getAllOnesValue(const Type *Ty);
+  
   /// isNullValue - Return true if this is the value that would be returned by
   /// getNullValue.
   virtual bool isNullValue() const = 0;
@@ -59,6 +64,10 @@ public:
   /// true for things like constant expressions that could divide by zero.
   bool canTrap() const;
 
+  /// ContaintsRelocations - Return true if the constant value contains
+  /// relocations which cannot be resolved at compile time.
+  bool ContainsRelocations() const;
+
   // Specialize get/setOperand for Constant's as their operands are always
   // constants as well.
   Constant *getOperand(unsigned i) {
@@ -84,8 +93,8 @@ public:
   static inline bool classof(const Constant *) { return true; }
   static inline bool classof(const GlobalValue *) { return true; }
   static inline bool classof(const Value *V) {
-    return V->getValueType() >= ConstantFirstVal &&
-           V->getValueType() <= ConstantLastVal;
+    return V->getValueID() >= ConstantFirstVal &&
+           V->getValueID() <= ConstantLastVal;
   }
 
   /// replaceUsesOfWithOnConstant - This method is a special form of