llvm.org GIT mirror llvm / 0b08637
Consider anything with a ValueType that is >= Instruction to be an instruction git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14429 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 16 years ago
2 changed file(s) with 3 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
137137 /// Methods for support type inquiry through isa, cast, and dyn_cast:
138138 static inline bool classof(const Instruction *I) { return true; }
139139 static inline bool classof(const Value *V) {
140 return V->getValueType() == Value::InstructionVal;
140 return V->getValueType() >= Value::InstructionVal;
141141 }
142142
143143 //----------------------------------------------------------------------
8585 // Methods for support type inquiry through isa, cast, and dyn_cast:
8686 static inline bool classof(const User *) { return true; }
8787 static inline bool classof(const Value *V) {
88 return V->getValueType() == Value::GlobalVariableVal ||
89 V->getValueType() == Value::ConstantVal ||
90 V->getValueType() == Value::InstructionVal;
88 return isa(V) || isa(V) ||
89 isa(V);
9190 }
9291 };
9392