diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-17 02:46:11 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-17 02:46:11 +0000 |
commit | 0a11af1f73916b53cd4eb4ebac37527facd9cf3b (patch) | |
tree | a0b2e3efd1ca8e5391d80546df8461b610b6bc3a /include | |
parent | 889cf0ec51d8fa3d31bf14a1a4db019f79c2e277 (diff) | |
download | external_llvm-0a11af1f73916b53cd4eb4ebac37527facd9cf3b.zip external_llvm-0a11af1f73916b53cd4eb4ebac37527facd9cf3b.tar.gz external_llvm-0a11af1f73916b53cd4eb4ebac37527facd9cf3b.tar.bz2 |
For PR1117:
Expose the previously hidden checkCast function as CastInst::castIsValid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33282 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/InstrTypes.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h index 50c1e7a..348671a 100644 --- a/include/llvm/InstrTypes.h +++ b/include/llvm/InstrTypes.h @@ -459,6 +459,12 @@ public: /// @brief Return the destination type, as a convenience const Type* getDestTy() const { return getType(); } + /// This method can be used to determine if a cast from S to DstTy using + /// Opcode op is valid or not. + /// @returns true iff the proposed cast is valid. + /// @brief Determine if a cast is valid without creating one. + static bool castIsValid(Instruction::CastOps op, Value *S, const Type *DstTy); + /// @brief Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const CastInst *) { return true; } static inline bool classof(const Instruction *I) { |