Do not use typeinfo to identify pass in pass manager.
[oota-llvm.git] / lib / Transforms / Scalar / SimplifyCFG.cpp
index 872232fb3edae935b12e669c43402a14c59e051c..4a4bcb6eac4d824a7ea81a05dcc31bf70ee8dfab 100644 (file)
@@ -35,8 +35,12 @@ STATISTIC(NumSimpl, "Number of blocks simplified");
 
 namespace {
   struct VISIBILITY_HIDDEN CFGSimplifyPass : public FunctionPass {
+    static const int ID; // Pass identifcation, replacement for typeid
+    CFGSimplifyPass() : FunctionPass((intptr_t)&ID) {}
+
     virtual bool runOnFunction(Function &F);
   };
+  const int CFGSimplifyPass::ID = 0;
   RegisterPass<CFGSimplifyPass> X("simplifycfg", "Simplify the CFG");
 }