Define a no-pointer-overflow flag for GetElementPtr instructions.
[oota-llvm.git] / include / llvm / Constants.h
index 12777025c6db66e5183bc988eaa65589069b8e1c..487dd6732afb69a2e28b17138e8e616507b52b8d 100644 (file)
@@ -50,6 +50,7 @@ class ConstantInt : public Constant {
   ConstantInt(const ConstantInt &);      // DO NOT IMPLEMENT
   ConstantInt(const IntegerType *Ty, const APInt& V);
   APInt Val;
+  friend class LLVMContextImpl;
 protected:
   // allocate space for exactly zero operands
   void *operator new(size_t s) {
@@ -102,10 +103,6 @@ public:
     return CreateTrueFalseVals(false);
   }
 
-  /// Return a ConstantInt with the specified value and an implied Type. The
-  /// type is the integer type that corresponds to the bit width of the value.
-  static ConstantInt *get(const APInt &V);
-
   /// getType - Specialize the getType() method to always return an IntegerType,
   /// which reduces the amount of casting needed in parts of the compiler.
   ///
@@ -216,6 +213,7 @@ class ConstantFP : public Constant {
   APFloat Val;
   void *operator new(size_t, unsigned);// DO NOT IMPLEMENT
   ConstantFP(const ConstantFP &);      // DO NOT IMPLEMENT
+  friend class LLVMContextImpl;
 protected:
   ConstantFP(const Type *Ty, const APFloat& V);
 protected:
@@ -224,9 +222,6 @@ protected:
     return User::operator new(s, 0);
   }
 public:
-  /// get() - Static factory methods - Return objects of the specified value
-  static ConstantFP *get(const APFloat &V);
-
   /// isValueValidForType - return true if Ty is big enough to represent V.
   static bool isValueValidForType(const Type *Ty, const APFloat& V);
   inline const APFloat& getValueAPF() const { return Val; }
@@ -313,11 +308,6 @@ protected:
 public:
   /// get() - Static factory methods - Return objects of the specified value
   static Constant *get(const ArrayType *T, const std::vector<Constant*> &);
-  static Constant *get(const ArrayType *T,
-                       Constant*const*Vals, unsigned NumVals) {
-    // FIXME: make this the primary ctor method.
-    return get(T, std::vector<Constant*>(Vals, Vals+NumVals));
-  }
 
   /// Transparently provide more efficient getOperand methods.
   DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Constant);
@@ -424,11 +414,6 @@ protected:
 public:
   /// get() - Static factory methods - Return objects of the specified value
   static Constant *get(const VectorType *T, const std::vector<Constant*> &);
-  static Constant *get(const std::vector<Constant*> &V);
-  static Constant *get(Constant*const* Vals, unsigned NumVals) {
-    // FIXME: make this the primary ctor method.
-    return get(std::vector<Constant*>(Vals, Vals+NumVals));
-  }
   
   /// Transparently provide more efficient getOperand methods.
   DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Constant);
@@ -760,17 +745,13 @@ class MDString : public Constant {
   MDString(const char *begin, const char *end);
 
   const char *StrBegin, *StrEnd;
+  friend class LLVMContextImpl;
 protected:
   // allocate space for exactly zero operands
   void *operator new(size_t s) {
     return User::operator new(s, 0);
   }
 public:
-  /// get() - Static factory methods - Return objects of the specified value.
-  ///
-  static MDString *get(const char *StrBegin, const char *StrEnd);
-  static MDString *get(const std::string &Str);
-
   /// size() - The length of this string.
   ///
   intptr_t size() const { return StrEnd - StrBegin; }