((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());
// 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) {}
// 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);}