diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-05-23 17:13:15 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-05-23 17:13:15 +0000 |
| commit | 5d4589ff347eceb7ed3bb1eac23d0817ad992915 (patch) | |
| tree | 4f0f2783281c896cc4c1ddeb4ba71f8a03eea940 | |
| parent | 5759dce959e10a5b98cd95bb221d4d9fa06031c4 (diff) | |
| download | bcm5719-llvm-5d4589ff347eceb7ed3bb1eac23d0817ad992915.tar.gz bcm5719-llvm-5d4589ff347eceb7ed3bb1eac23d0817ad992915.zip | |
Minor rewording/cleanups
llvm-svn: 6311
| -rw-r--r-- | llvm/include/llvm/Constants.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/llvm/include/llvm/Constants.h b/llvm/include/llvm/Constants.h index d589767508a..7e2cd845dc8 100644 --- a/llvm/include/llvm/Constants.h +++ b/llvm/include/llvm/Constants.h @@ -458,27 +458,29 @@ public: }; -// 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); |

