[llvm-commits] CVS: llvm/include/llvm/Pass.h
Reid Spencer
reid at x10sys.com
Tue Dec 7 00:11:22 PST 2004
Changes in directory llvm/include/llvm:
Pass.h updated: 1.48 -> 1.49
---
Log message:
For PR387: http://llvm.cs.uiuc.edu/PR387 :\
Add runPass methods to remove -Woverloaded-virtual warnings are not \
present and circumvent possible inheritance bugs.
---
Diffs of the changes: (+6 -3)
Index: llvm/include/llvm/Pass.h
diff -u llvm/include/llvm/Pass.h:1.48 llvm/include/llvm/Pass.h:1.49
--- llvm/include/llvm/Pass.h:1.48 Mon Dec 6 22:03:44 2004
+++ llvm/include/llvm/Pass.h Tue Dec 7 02:11:11 2004
@@ -87,7 +87,8 @@
/// runPass - Run this pass, returning true if a modification was made to the
/// module argument. This should be implemented by all concrete subclasses.
///
- virtual bool runPass(Module &M) = 0;
+ virtual bool runPass(Module &M) { return false; }
+ virtual bool runPass(BasicBlock&) { return false; }
/// print - Print out the internal state of the pass. This is called by
/// Analyze to print out the contents of an analysis. Otherwise it is not
@@ -216,7 +217,8 @@
/// being operated on.
virtual bool runOnModule(Module &M) = 0;
- bool runPass(Module &M) { return runOnModule(M); }
+ virtual bool runPass(Module &M) { return runOnModule(M); }
+ virtual bool runPass(BasicBlock&) { return false; }
virtual void addToPassManager(PassManagerT<Module> *PM, AnalysisUsage &AU);
};
@@ -338,7 +340,8 @@
/// To run directly on the basic block, we initialize, runOnBasicBlock, then
/// finalize.
///
- bool runPass(BasicBlock &BB);
+ virtual bool runPass(Module &M) { return false; }
+ virtual bool runPass(BasicBlock &BB);
private:
friend class PassManagerT<Function>;
More information about the llvm-commits
mailing list