[PM] Add names and debug logging for analysis passes to the new pass
[oota-llvm.git] / unittests / IR / PassManagerTest.cpp
index d641e36ac6ad7722c632468ba595898e3c3fb488..41af0b0bd25c4165b98b34b4e4a3679619a8a765 100644 (file)
@@ -29,6 +29,9 @@ public:
   /// \brief Returns an opaque, unique ID for this pass type.
   static void *ID() { return (void *)&PassID; }
 
+  /// \brief Returns the name of the analysis.
+  static StringRef name() { return "TestFunctionAnalysis"; }
+
   TestFunctionAnalysis(int &Runs) : Runs(Runs) {}
 
   /// \brief Run the analysis pass over the function and return a result.
@@ -60,6 +63,8 @@ public:
 
   static void *ID() { return (void *)&PassID; }
 
+  static StringRef name() { return "TestModuleAnalysis"; }
+
   TestModuleAnalysis(int &Runs) : Runs(Runs) {}
 
   Result run(Module &M, ModuleAnalysisManager *AM) {