[llvm-commits] CVS: llvm/include/llvm/Constants.h
Reid Spencer
reid at x10sys.com
Mon Dec 11 16:51:25 PST 2006
Changes in directory llvm/include/llvm:
Constants.h updated: 1.105 -> 1.106
---
Log message:
Implement getIntegerCast and getFPCast for ConstantExpr. These are similar
to the createIntegerCast and createFPCast for CastInst instructions.
---
Diffs of the changes: (+13 -0)
Constants.h | 13 +++++++++++++
1 files changed, 13 insertions(+)
Index: llvm/include/llvm/Constants.h
diff -u llvm/include/llvm/Constants.h:1.105 llvm/include/llvm/Constants.h:1.106
--- llvm/include/llvm/Constants.h:1.105 Fri Dec 8 12:06:14 2006
+++ llvm/include/llvm/Constants.h Mon Dec 11 18:51:07 2006
@@ -559,6 +559,19 @@
const Type *Ty ///< The type to which cast should be made
);
+ /// @brief Create a ZExt, Bitcast or Trunc for integer -> integer casts
+ static Constant *getIntegerCast(
+ Constant *C, ///< The integer constant to be casted
+ const Type *Ty, ///< The integer type to cast to
+ bool isSigned ///< Whether C should be treated as signed or not
+ );
+
+ /// @brief Create a FPExt, Bitcast or FPTrunc for fp -> fp casts
+ static Constant *getFPCast(
+ Constant *C, ///< The integer constant to be casted
+ const Type *Ty ///< The integer type to cast to
+ );
+
static Constant *getCast(Constant *C, const Type *Ty);
/// @brief Return true if this is a convert constant expression
More information about the llvm-commits
mailing list