mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Provide visit(Module&) and visitModule(Module&) functionality.
llvm-svn: 13353
This commit is contained in:
parent
f3b62c562e
commit
4d6a3d4e1e
@ -88,6 +88,10 @@ struct InstVisitor {
|
|||||||
|
|
||||||
// Define visitors for 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) {
|
void visit(Function &F) {
|
||||||
((SubClass*)this)->visitFunction(F);
|
((SubClass*)this)->visitFunction(F);
|
||||||
visit(F.begin(), F.end());
|
visit(F.begin(), F.end());
|
||||||
@ -127,6 +131,7 @@ struct InstVisitor {
|
|||||||
// When visiting a module, function or basic block directly, these methods get
|
// When visiting a module, function or basic block directly, these methods get
|
||||||
// called to indicate when transitioning into a new unit.
|
// called to indicate when transitioning into a new unit.
|
||||||
//
|
//
|
||||||
|
void visitModule (Module &M) {}
|
||||||
void visitFunction (Function &F) {}
|
void visitFunction (Function &F) {}
|
||||||
void visitBasicBlock(BasicBlock &BB) {}
|
void visitBasicBlock(BasicBlock &BB) {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user