Add support for shifts
[oota-llvm.git] / include / llvm / Support / InstVisitor.h
index 8b3a28d5f93c63edb401a4f69fbc3f95efba9513..a9b3b7150656c159648d1851d473c8b0ecd16ff1 100644 (file)
 #define LLVM_SUPPORT_INSTVISITOR_H
 
 #include "llvm/Function.h"
+#include "llvm/Module.h"
 
 namespace llvm {
 
-class Module;
-
 // We operate on opaque instruction classes, so forward declare all instruction
 // types now...
 //
@@ -72,8 +71,6 @@ class AllocationInst;
 
 template<typename SubClass, typename RetTy=void>
 struct InstVisitor {
-  virtual ~InstVisitor() {}           // We are meant to be derived from
-
   //===--------------------------------------------------------------------===//
   // Interface code - This is the public interface of the InstVisitor that you
   // use to visit instructions...
@@ -159,6 +156,7 @@ struct InstVisitor {
   RetTy visitSwitchInst(SwitchInst &I)              { DELEGATE(TerminatorInst);}
   RetTy visitInvokeInst(InvokeInst &I)              { DELEGATE(TerminatorInst);}
   RetTy visitUnwindInst(UnwindInst &I)              { DELEGATE(TerminatorInst);}
+  RetTy visitUnreachableInst(UnreachableInst &I)    { DELEGATE(TerminatorInst);}
   RetTy visitSetCondInst(SetCondInst &I)            { DELEGATE(BinaryOperator);}
   RetTy visitMallocInst(MallocInst &I)              { DELEGATE(AllocationInst);}
   RetTy visitAllocaInst(AllocaInst &I)              { DELEGATE(AllocationInst);}