#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...
//
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...
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);}