forked from OSchip/llvm-project
Consider anything with a ValueType that is >= Instruction to be an instruction
llvm-svn: 14429
This commit is contained in:
parent
d0b0b454e5
commit
f758330347
|
@ -138,7 +138,7 @@ public:
|
|||
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||
static inline bool classof(const Instruction *I) { return true; }
|
||||
static inline bool classof(const Value *V) {
|
||||
return V->getValueType() == Value::InstructionVal;
|
||||
return V->getValueType() >= Value::InstructionVal;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -86,9 +86,8 @@ public:
|
|||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||
static inline bool classof(const User *) { return true; }
|
||||
static inline bool classof(const Value *V) {
|
||||
return V->getValueType() == Value::GlobalVariableVal ||
|
||||
V->getValueType() == Value::ConstantVal ||
|
||||
V->getValueType() == Value::InstructionVal;
|
||||
return isa<Instruction>(V) || isa<GlobalVariable>(V) ||
|
||||
isa<Constant>(V);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue