[llvm-commits] CVS: llvm/include/llvm/Analysis/CallGraph.h FindUnsafePointerTypes.h FindUsedTypes.h

Chris Lattner lattner at cs.uiuc.edu
Sun Sep 19 21:43:04 PDT 2004



Changes in directory llvm/include/llvm/Analysis:

CallGraph.h updated: 1.41 -> 1.42
FindUnsafePointerTypes.h updated: 1.16 -> 1.17
FindUsedTypes.h updated: 1.22 -> 1.23
---
Log message:

'Pass' should now not be derived from by clients.  Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement 
ModulePass::runOnModule.


---
Diffs of the changes:  (+7 -7)

Index: llvm/include/llvm/Analysis/CallGraph.h
diff -u llvm/include/llvm/Analysis/CallGraph.h:1.41 llvm/include/llvm/Analysis/CallGraph.h:1.42
--- llvm/include/llvm/Analysis/CallGraph.h:1.41	Sat Sep 18 16:34:21 2004
+++ llvm/include/llvm/Analysis/CallGraph.h	Sun Sep 19 23:42:22 2004
@@ -64,7 +64,7 @@
 //===----------------------------------------------------------------------===//
 // CallGraph class definition
 //
-class CallGraph : public Pass {
+class CallGraph : public ModulePass {
   Module *Mod;              // The module this call graph represents
 
   typedef std::map<const Function *, CallGraphNode *> FunctionMapTy;
@@ -150,8 +150,8 @@
   CallGraph() : Root(0), CallsExternalNode(0) {}
   ~CallGraph() { destroy(); }
 
-  // run - Compute the call graph for the specified module.
-  virtual bool run(Module &M);
+  // runOnModule - Compute the call graph for the specified module.
+  virtual bool runOnModule(Module &M);
 
   // getAnalysisUsage - This obviously provides a call graph
   virtual void getAnalysisUsage(AnalysisUsage &AU) const {


Index: llvm/include/llvm/Analysis/FindUnsafePointerTypes.h
diff -u llvm/include/llvm/Analysis/FindUnsafePointerTypes.h:1.16 llvm/include/llvm/Analysis/FindUnsafePointerTypes.h:1.17
--- llvm/include/llvm/Analysis/FindUnsafePointerTypes.h:1.16	Thu Mar 11 17:08:20 2004
+++ llvm/include/llvm/Analysis/FindUnsafePointerTypes.h	Sun Sep 19 23:42:22 2004
@@ -31,7 +31,7 @@
 
 class PointerType;
 
-struct FindUnsafePointerTypes : public Pass {
+struct FindUnsafePointerTypes : public ModulePass {
   // UnsafeTypes - Set of types that are not safe to transform.
   std::set<PointerType*> UnsafeTypes;
 public:
@@ -44,7 +44,7 @@
   /// values of various types.  If they are deemed to be 'unsafe' note that the
   /// type is not safe to transform.
   ///
-  virtual bool run(Module &M);
+  virtual bool runOnModule(Module &M);
 
   /// print - Loop over the results of the analysis, printing out unsafe types.
   ///


Index: llvm/include/llvm/Analysis/FindUsedTypes.h
diff -u llvm/include/llvm/Analysis/FindUsedTypes.h:1.22 llvm/include/llvm/Analysis/FindUsedTypes.h:1.23
--- llvm/include/llvm/Analysis/FindUsedTypes.h:1.22	Tue Nov 11 16:41:31 2003
+++ llvm/include/llvm/Analysis/FindUsedTypes.h	Sun Sep 19 23:42:22 2004
@@ -21,7 +21,7 @@
 
 class Type;
 
-class FindUsedTypes : public Pass {
+class FindUsedTypes : public ModulePass {
   std::set<const Type *> UsedTypes;
 public:
   /// getTypes - After the pass has been run, return the set containing all of
@@ -47,7 +47,7 @@
 
 public:
   /// run - This incorporates all types used by the specified module
-  bool run(Module &M);
+  bool runOnModule(Module &M);
 
   /// getAnalysisUsage - We do not modify anything.
   virtual void getAnalysisUsage(AnalysisUsage &AU) const {






More information about the llvm-commits mailing list