Add a useful method.
[oota-llvm.git] / include / llvm / Analysis / FindUnsafePointerTypes.h
index 8f1cdcf0940de33e8a3819e1fcd335111ccda05a..2d453f087a6c127bf228737322d2c126d63a58f9 100644 (file)
 #include "llvm/Pass.h"
 #include <set>
 
+namespace llvm {
+
 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:
@@ -38,21 +40,23 @@ public:
     return UnsafeTypes;
   }
 
-  // run - Inspect the operations that the specified module does on
-  // 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);
+  /// run - Inspect the operations that the specified module does on
+  /// values of various types.  If they are deemed to be 'unsafe' note that the
+  /// type is not safe to transform.
+  ///
+  virtual bool runOnModule(Module &M);
 
-  // print - Loop over the results of the analysis, printing out unsafe types.
-  //
+  /// print - Loop over the results of the analysis, printing out unsafe types.
+  ///
   void print(std::ostream &o, const Module *Mod) const;
 
-  // getAnalysisUsage - Of course, we provide ourself...
-  //
+  /// getAnalysisUsage - Of course, we provide ourself...
+  ///
   virtual void getAnalysisUsage(AnalysisUsage &AU) const {
     AU.setPreservesAll();
   }
 };
 
+} // End llvm namespace
+
 #endif