Expand the pass to unify all of the unwind blocks as well
[oota-llvm.git] / include / llvm / Support / InstVisitor.h
index 6004aac88fddccb4a35a9b491fb3970afd9ffe51..758cc99064b767e601569654da2f1f5a006e69d8 100644 (file)
@@ -78,12 +78,8 @@ struct InstVisitor {
       ((SubClass*)this)->visit(*Start++);
   }
 
-  // Define visitors for modules, functions and basic blocks...
+  // Define visitors for functions and basic blocks...
   //
-  void visit(Module &M) {
-    ((SubClass*)this)->visitModule(M);
-    visit(M.begin(), M.end());
-  }
   void visit(Function &F) {
     ((SubClass*)this)->visitFunction(F);
     visit(F.begin(), F.end());
@@ -123,7 +119,6 @@ struct InstVisitor {
   // When visiting a module, function or basic block directly, these methods get
   // called to indicate when transitioning into a new unit.
   //
-  void visitModule    (Module &M) {}
   void visitFunction  (Function &F) {}
   void visitBasicBlock(BasicBlock &BB) {}
 
@@ -155,12 +150,13 @@ struct InstVisitor {
 
   
   // Specific Instruction type classes... note that all of the casts are
-  // neccesary because we use the instruction classes as opaque types...
+  // necessary because we use the instruction classes as opaque types...
   //
   RetTy visitReturnInst(ReturnInst &I)              { DELEGATE(TerminatorInst);}
   RetTy visitBranchInst(BranchInst &I)              { DELEGATE(TerminatorInst);}
   RetTy visitSwitchInst(SwitchInst &I)              { DELEGATE(TerminatorInst);}
   RetTy visitInvokeInst(InvokeInst &I)              { DELEGATE(TerminatorInst);}
+  RetTy visitUnwindInst(UnwindInst &I)              { DELEGATE(TerminatorInst);}
   RetTy visitSetCondInst(SetCondInst &I)            { DELEGATE(BinaryOperator);}
   RetTy visitMallocInst(MallocInst &I)              { DELEGATE(AllocationInst);}
   RetTy visitAllocaInst(AllocaInst &I)              { DELEGATE(AllocationInst);}