diff options
Diffstat (limited to 'llvm/include/llvm/Constant.h')
| -rw-r--r-- | llvm/include/llvm/Constant.h | 8 | 
1 files changed, 2 insertions, 6 deletions
| diff --git a/llvm/include/llvm/Constant.h b/llvm/include/llvm/Constant.h index b8ec03b3ec4..b82a259849a 100644 --- a/llvm/include/llvm/Constant.h +++ b/llvm/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 | 

