mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Add some methods to make type safety a bit easier
llvm-svn: 6198
This commit is contained in:
parent
d92b365710
commit
0619ee9f39
@ -506,6 +506,15 @@ public:
|
||||
virtual void destroyConstant();
|
||||
virtual void replaceUsesOfWithOnConstant(Value *From, Value *To);
|
||||
|
||||
/// Override methods to provide more type information...
|
||||
inline Constant *getOperand(unsigned i) {
|
||||
return cast<Constant>(User::getOperand(i));
|
||||
}
|
||||
inline Constant *getOperand(unsigned i) const {
|
||||
return const_cast<Constant*>(cast<Constant>(User::getOperand(i)));
|
||||
}
|
||||
|
||||
|
||||
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||
static inline bool classof(const ConstantExpr *) { return true; }
|
||||
static inline bool classof(const Constant *CPV) {
|
||||
|
Loading…
Reference in New Issue
Block a user