Minor rewording/cleanups

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6311 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-05-23 17:13:15 +00:00
parent 28345b9193
commit baf850a51a

View File

@ -458,27 +458,29 @@ public:
}; };
// ConstantExpr - a constant value that is initialized with // ConstantExpr - a constant value that is initialized with an expression using
// an expression using other constant values. This is only used // other constant values. This is only used to represent values that cannot be
// to represent values that cannot be evaluated at compile-time // evaluated at compile-time (e.g., something derived from an address) because
// (e.g., something derived from an address) because it does // it does not have a mechanism to store the actual value. Use the appropriate
// not have a mechanism to store the actual value. // Constant subclass above for known constants.
// Use the appropriate Constant subclass above for known constants.
// //
class ConstantExpr : public Constant { class ConstantExpr : public Constant {
unsigned iType; // Operation type unsigned iType; // Operation type
protected: protected:
ConstantExpr(unsigned Opcode, Constant *C, const Type *Ty); // Cast creation ctor
ConstantExpr(unsigned Opcode, Constant *C, const Type *Ty);
// Binary/Shift instruction creation ctor
ConstantExpr(unsigned Opcode, Constant *C1, Constant *C2); ConstantExpr(unsigned Opcode, Constant *C1, Constant *C2);
// GEP instruction creation ctor
ConstantExpr(Constant *C, const std::vector<Constant*> &IdxList, ConstantExpr(Constant *C, const std::vector<Constant*> &IdxList,
const Type *DestTy); const Type *DestTy);
~ConstantExpr() {}
public: public:
// Static methods to construct a ConstantExpr of different kinds. Note that // Static methods to construct a ConstantExpr of different kinds. Note that
// these methods can return a constant of an arbitrary type, because they will // these methods may return a object that is not an instance of the
// attempt to fold the constant expression into something simple if they can. // ConstantExpr class, because they will attempt to fold the constant
// expression into something simpler if possible.
/// Cast constant expr /// Cast constant expr
static Constant *getCast(Constant *C, const Type *Ty); static Constant *getCast(Constant *C, const Type *Ty);