diff options
author | Chris Lattner <sabre@nondot.org> | 2004-07-19 00:58:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-07-19 00:58:02 +0000 |
commit | 9344063f5ffa46466e51af30cffdb72730b2db32 (patch) | |
tree | b5506158576d5439587bc55468f956b05bbe00dd /include/llvm/Constant.h | |
parent | 66a434692b63ac76c99a0d259c7fedc0b75a1d6a (diff) | |
download | external_llvm-9344063f5ffa46466e51af30cffdb72730b2db32.zip external_llvm-9344063f5ffa46466e51af30cffdb72730b2db32.tar.gz external_llvm-9344063f5ffa46466e51af30cffdb72730b2db32.tar.bz2 |
eliminate isConstantExpr, changes to isa<Constant> implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14985 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Constant.h')
-rw-r--r-- | include/llvm/Constant.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/include/llvm/Constant.h b/include/llvm/Constant.h index 7b53fb1..301d9a4 100644 --- a/include/llvm/Constant.h +++ b/include/llvm/Constant.h @@ -20,7 +20,7 @@ namespace llvm { class Constant : public User { protected: - inline Constant(const Type *Ty, ValueTy vty = Value::ConstantVal, + inline Constant(const Type *Ty, ValueTy vty = Value::SimpleConstantVal, const std::string& Name = "" ) : User(Ty, vty, Name) {} ~Constant() {} @@ -40,11 +40,6 @@ public: virtual void print(std::ostream &O) const; - /// isConstantExpr - Return true if this is a ConstantExpr - /// - virtual bool isConstantExpr() const { return false; } - - /// destroyConstant - Called if some element of this constant is no longer /// valid. At this point only other constants may be on the use_list for this /// constant. Any constants on our Use list must also be destroy'd. The @@ -59,7 +54,9 @@ 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::ConstantVal || + return V->getValueType() == Value::SimpleConstantVal || + V->getValueType() == Value::ConstantExprVal || + V->getValueType() == Value::ConstantAggregateZeroVal || V->getValueType() == Value::FunctionVal || V->getValueType() == Value::GlobalVariableVal; } |