mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +00:00
Add some convenience functions for getting the source and destination
types from any Cast instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32807 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8155d6d8d9
commit
5fe31dc520
@ -454,6 +454,11 @@ public:
|
||||
return Instruction::CastOps(Instruction::getOpcode());
|
||||
}
|
||||
|
||||
/// @brief Return the source type, as a convenience
|
||||
const Type* getSrcTy() const { return getOperand(0)->getType(); }
|
||||
/// @brief Return the destination type, as a convenience
|
||||
const Type* getDestTy() const { return getType(); }
|
||||
|
||||
/// @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) {
|
||||
|
Loading…
Reference in New Issue
Block a user