mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Implement new cast creation functions for both instructions and constant
expressions. These will get used to reduce clutter as we replace various calls to createInferredCast and getCast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32191 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -541,6 +541,24 @@ public:
|
||||
const Type *Ty ///< The type to which the constant is converted
|
||||
);
|
||||
|
||||
// @brief Create a ZExt or BitCast cast constant expression
|
||||
static Constant *getZExtOrBitCast(
|
||||
Constant *C, ///< The constant to zext or bitcast
|
||||
const Type *Ty ///< The type to zext or bitcast C to
|
||||
);
|
||||
|
||||
// @brief Create a SExt or BitCast cast constant expression
|
||||
static Constant *getSExtOrBitCast(
|
||||
Constant *C, ///< The constant to zext or bitcast
|
||||
const Type *Ty ///< The type to zext or bitcast C to
|
||||
);
|
||||
|
||||
// @brief Create a Trunc or BitCast cast constant expression
|
||||
static Constant *getTruncOrBitCast(
|
||||
Constant *C, ///< The constant to zext or bitcast
|
||||
const Type *Ty ///< The type to zext or bitcast C to
|
||||
);
|
||||
|
||||
// This method uses the CastInst::getCastOpcode method to infer the
|
||||
// cast opcode to use.
|
||||
// @brief Get a ConstantExpr Conversion operator that casts C to Ty
|
||||
|
Reference in New Issue
Block a user