From d30658c3ffd1e33e98b82750202a9375bf5963ed Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 11 Aug 2009 17:03:18 +0000 Subject: [PATCH] Avoid implicitly depending on Instructions.h. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78681 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Operator.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/llvm/Operator.h b/include/llvm/Operator.h index c62164bcbce..6057c4b877b 100644 --- a/include/llvm/Operator.h +++ b/include/llvm/Operator.h @@ -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(V) || + return (isa(V) && classof(cast(V))) || (isa(V) && classof(cast(V))); } }; -- 2.11.0