+ /// 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);
+
+ /// getPtrPtrFromArrayPtr constant expr - given a pointer to a constant array,
+ /// return a pointer to a pointer of the array element type.
+ static Constant *getPtrPtrFromArrayPtr(Constant *C);
+
+ /// ConstantExpr::get - Return a binary or shift operator constant expression,
+ /// folding if possible.
+ ///
+ static Constant *get(unsigned Opcode, Constant *C1, Constant *C2);
+
+ /// ConstantExpr::get* - Return some common constants without having to
+ /// specify the full Instruction::OPCODE identifier.
+ ///
+ static Constant *getNeg(Constant *C);
+ static Constant *getNot(Constant *C);
+ static Constant *getAdd(Constant *C1, Constant *C2);
+ static Constant *getSub(Constant *C1, Constant *C2);
+ static Constant *getMul(Constant *C1, Constant *C2);
+ static Constant *getDiv(Constant *C1, Constant *C2);
+ static Constant *getRem(Constant *C1, Constant *C2);
+ static Constant *getAnd(Constant *C1, Constant *C2);
+ static Constant *getOr(Constant *C1, Constant *C2);
+ static Constant *getXor(Constant *C1, Constant *C2);
+ static Constant *getSetEQ(Constant *C1, Constant *C2);
+ static Constant *getSetNE(Constant *C1, Constant *C2);
+ static Constant *getSetLT(Constant *C1, Constant *C2);
+ static Constant *getSetGT(Constant *C1, Constant *C2);
+ static Constant *getSetLE(Constant *C1, Constant *C2);
+ static Constant *getSetGE(Constant *C1, Constant *C2);
+ static Constant *getShl(Constant *C1, Constant *C2);
+ static Constant *getShr(Constant *C1, Constant *C2);
+
+ static Constant *getUShr(Constant *C1, Constant *C2); // unsigned shr
+ static Constant *getSShr(Constant *C1, Constant *C2); // signed shr
+
+ /// Getelementptr form. std::vector<Value*> is only accepted for convenience:
+ /// all elements must be Constant's.
+ ///
+ static Constant *getGetElementPtr(Constant *C,
+ const std::vector<Constant*> &IdxList);
+ static Constant *getGetElementPtr(Constant *C,
+ const std::vector<Value*> &IdxList);
+
+ static Constant *getExtractElement(Constant *Vec, Constant *Idx);
+ static Constant *getInsertElement(Constant *Vec, Constant *Elt,Constant *Idx);
+ static Constant *getShuffleVector(Constant *V1, Constant *V2, Constant *Mask);
+
+ /// isNullValue - Return true if this is the value that would be returned by
+ /// getNullValue.
+ virtual bool isNullValue() const { return false; }
+
+ /// getOpcode - Return the opcode at the root of this constant expression
+ unsigned getOpcode() const { return SubclassData; }
+
+ /// getOpcodeName - Return a string representation for an opcode.
+ const char *getOpcodeName() const;
+