aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Constant.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Constant.h')
-rw-r--r--include/llvm/Constant.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/llvm/Constant.h b/include/llvm/Constant.h
index b8ec03b3ec..b82a259849 100644
--- a/include/llvm/Constant.h
+++ b/include/llvm/Constant.h
@@ -61,12 +61,8 @@ public:
static inline bool classof(const Constant *) { return true; }
static inline bool classof(const GlobalValue *) { return true; }
static inline bool classof(const Value *V) {
- return V->getValueType() == Value::SimpleConstantVal ||
- V->getValueType() == Value::ConstantExprVal ||
- V->getValueType() == Value::ConstantAggregateZeroVal ||
- V->getValueType() == Value::FunctionVal ||
- V->getValueType() == Value::GlobalVariableVal ||
- V->getValueType() == Value::UndefValueVal;
+ return V->getValueType() >= ConstantFirstVal &&
+ V->getValueType() <= ConstantLastVal;
}
/// replaceUsesOfWithOnConstant - This method is a special form of