Avoid implicitly depending on Instructions.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78681 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2009-08-11 17:03:18 +00:00
parent 02552decf9
commit d30658c3ff

View File

@ -20,6 +20,8 @@
namespace llvm {
class GetElementPtrInst;
/// Operator - This is a utility class that provides an abstraction for the
/// common functionality between Instructions and ConstantExprs.
///
@ -242,7 +244,7 @@ public:
return I->getOpcode() == Instruction::GetElementPtr;
}
static inline bool classof(const Value *V) {
return isa<GetElementPtrInst>(V) ||
return (isa<Instruction>(V) && classof(cast<Instruction>(V))) ||
(isa<ConstantExpr>(V) && classof(cast<ConstantExpr>(V)));
}
};