[llvm-commits] CVS: llvm/include/llvm/Constants.h

Chris Lattner lattner at cs.uiuc.edu
Fri May 23 12:14:01 PDT 2003


Changes in directory llvm/include/llvm:

Constants.h updated: 1.23 -> 1.24

---
Log message:

Minor rewording/cleanups


---
Diffs of the changes:

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





More information about the llvm-commits mailing list