Relax the restrictions on vector of pointer types, and vector getelementptr.
[oota-llvm.git] / include / llvm / Constant.h
index 7fecf4c7b4564d8517f9596c1c259babe2d35375..bbd1b1a6e2c80ff6de5678f1658b21bd7c95ae1e 100644 (file)
@@ -97,7 +97,15 @@ public:
   /// 'this' is a constant expr.
   Constant *getAggregateElement(unsigned Elt) const;
   Constant *getAggregateElement(Constant *Elt) const;
-  
+
+  /// getSplatValue - If this is a splat vector constant, meaning that all of
+  /// the elements have the same value, return that value. Otherwise return 0.
+  Constant *getSplatValue() const;
+
+  /// If C is a constant integer then return its value, otherwise C must be a
+  /// vector of constant integers, all equal, and the common value is returned.
+  const APInt &getUniqueInteger() const;
+
   /// destroyConstant - Called if some element of this constant is no longer
   /// valid.  At this point only other constants may be on the use_list for this
   /// constant.  Any constants on our Use list must also be destroy'd.  The