Add HAVE_SYSCONF
[oota-llvm.git] / include / llvm / Pass.h
index ff710d37664ea909c50741e198cfdd19c3ea3cea..e6083a3ca88b0f6f0014617124cda4c17e11c881 100644 (file)
@@ -87,7 +87,8 @@ public:
   /// 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
@@ -96,8 +97,7 @@ public:
   /// provide the Module* in case the analysis doesn't need it it can just be
   /// ignored.
   ///
-  virtual void print(std::ostream &O, const Module *M) const { print(O); }
-  virtual void print(std::ostream &O) const;
+  virtual void print(std::ostream &O, const Module *M) const;
   void dump() const; // dump - call print(std::cerr, 0);
 
 
@@ -217,7 +217,8 @@ public:
   /// 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);
 };
@@ -339,7 +340,8 @@ struct BasicBlockPass : public FunctionPass {
   /// 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>;