Adding a collector name attribute to Function in the IR. These
[oota-llvm.git] / lib / VMCore / Pass.cpp
index b45f427cbcfdadfa12fb3bbf2bfbe6ee1d3761af..b9d10e5a45338e93666ce8af365055d49d77b077 100644 (file)
@@ -18,7 +18,6 @@
 #include "llvm/ModuleProvider.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/ManagedStatic.h"
-#include "llvm/Support/TypeInfo.h"
 #include <algorithm>
 #include <set>
 using namespace llvm;
@@ -49,7 +48,7 @@ void Pass::dumpPassStructure(unsigned Offset) {
 const char *Pass::getPassName() const {
   if (const PassInfo *PI = getPassInfo())
     return PI->getPassName();
-  return typeid(*this).name();
+  return "Unnamed pass: implement Pass::getPassName()";
 }
 
 // print - Print out the internal state of the pass.  This is called by Analyze
@@ -155,7 +154,7 @@ public:
   void RegisterPass(PassInfo &PI) {
     bool Inserted =
       PassInfoMap.insert(std::make_pair(PI.getTypeInfo(),&PI)).second;
-    //assert(Inserted && "Pass registered multiple times!");
+    assert(Inserted && "Pass registered multiple times!");
   }
   
   void UnregisterPass(PassInfo &PI) {