Wrap long lines
[oota-llvm.git] / include / llvm / Constants.h
index 5cfcf1d305c01506215676676f86ad6f58a4f880..e8929f644314db8d115ba2f651a0740b7bc57f4d 100644 (file)
@@ -557,6 +557,11 @@ public:
     return getSelectTy(V1->getType(), C, V1, V2);
   }
 
+  /// getSizeOf constant expr - computes the size of a type in a target
+  /// independent way (Note: the return type is ULong but the object is not
+  /// necessarily a ConstantUInt).
+  ///
+  static Constant *getSizeOf(const Type *Ty);
 
   /// ConstantExpr::get - Return a binary or shift operator constant expression,
   /// folding if possible.
@@ -626,6 +631,37 @@ public:
   }
 };
 
+
+//===----------------------------------------------------------------------===//
+/// UndefValue - 'undef' values are things that do not have specified contents.
+/// These are used for a variety of purposes, including global variable
+/// initializers and operands to instructions.  'undef' values can occur with
+/// any type.
+///
+class UndefValue : public Constant {
+  friend struct ConstantCreator<UndefValue, Type, char>;
+  UndefValue(const UndefValue &);      // DO NOT IMPLEMENT
+protected:
+  UndefValue(const Type *T) : Constant(T, UndefValueVal) {}
+public:
+  /// get() - Static factory methods - Return an 'undef' object of the specified
+  /// type.
+  ///
+  static UndefValue *get(const Type *T);
+
+  /// isNullValue - Return true if this is the value that would be returned by
+  /// getNullValue.
+  virtual bool isNullValue() const { return false; }
+
+  virtual void destroyConstant();
+
+  /// Methods for support type inquiry through isa, cast, and dyn_cast:
+  static inline bool classof(const UndefValue *) { return true; }
+  static bool classof(const Value *V) {
+    return V->getValueType() == UndefValueVal;
+  }
+};
+
 } // End llvm namespace
 
 #endif