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

Reid Spencer reid at x10sys.com
Tue Jan 16 18:46:30 PST 2007



Changes in directory llvm/include/llvm:

InstrTypes.h updated: 1.59 -> 1.60
---
Log message:

For PR1117: http://llvm.org/PR1117 :
Expose the previously hidden checkCast function as CastInst::castIsValid.


---
Diffs of the changes:  (+6 -0)

 InstrTypes.h |    6 ++++++
 1 files changed, 6 insertions(+)


Index: llvm/include/llvm/InstrTypes.h
diff -u llvm/include/llvm/InstrTypes.h:1.59 llvm/include/llvm/InstrTypes.h:1.60
--- llvm/include/llvm/InstrTypes.h:1.59	Mon Jan  1 20:08:27 2007
+++ llvm/include/llvm/InstrTypes.h	Tue Jan 16 20:46:11 2007
@@ -459,6 +459,12 @@
   /// @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) {






More information about the llvm-commits mailing list