Provide visit(Module&) and visitModule(Module&) functionality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13353 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Misha Brukman 2004-05-04 18:30:38 +00:00
parent b171d7949d
commit 2dd5c96866

View File

@ -88,6 +88,10 @@ struct InstVisitor {
// 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());
@ -127,6 +131,7 @@ 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) {}