aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ConstPoolVals.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ConstPoolVals.h')
-rw-r--r--include/llvm/ConstPoolVals.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/ConstPoolVals.h b/include/llvm/ConstPoolVals.h
index 7ebe3f3ce2..1bd2dce811 100644
--- a/include/llvm/ConstPoolVals.h
+++ b/include/llvm/ConstPoolVals.h
@@ -32,6 +32,12 @@ public:
// Static constructor to get a '0' constant of arbitrary type...
static ConstPoolVal *getNullConstant(const Type *Ty);
+
+ // Methods for support type inquiry through isa, cast, and dyn_cast:
+ static inline bool isa(const ConstPoolVal *) { return true; }
+ static inline bool isa(const Value *V) {
+ return V->getValueType() == Value::ConstantVal;
+ }
};