aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Constants.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index 396a5ca093..7c0a00506a 100644
--- a/include/llvm/Constants.h
+++ b/include/llvm/Constants.h
@@ -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) {