Do not use typeinfo to identify pass in pass manager.
[oota-llvm.git] / lib / Transforms / Scalar / CorrelatedExprs.cpp
index d42dd9a7e2730d83beb80fa61895f30ed6b7789f..540f62c67477bd5125d893e8a16f71aaf99e53c3 100644 (file)
@@ -225,6 +225,9 @@ namespace {
     std::map<BasicBlock*, RegionInfo> RegionInfoMap;
     ETForest *EF;
   public:
+    static const int ID; // Pass identifcation, replacement for typeid
+    CEE() : FunctionPass((intptr_t)&ID) {}
+
     virtual bool runOnFunction(Function &F);
 
     // We don't modify the program, so we preserve all analyses
@@ -284,6 +287,8 @@ namespace {
     bool SimplifyBasicBlock(BasicBlock &BB, const RegionInfo &RI);
     bool SimplifyInstruction(Instruction *Inst, const RegionInfo &RI);
   };
+  
+  const int CEE::ID = 0;
   RegisterPass<CEE> X("cee", "Correlated Expression Elimination");
 }