Do not use typeinfo to identify pass in pass manager.
[oota-llvm.git] / lib / Transforms / Instrumentation / EdgeProfiling.cpp
index e45d2bfd151f9c37a4994c36b826037daa0461ae..ff7d4270ba492244c7a7975cede5151a3a4f4247 100644 (file)
@@ -32,8 +32,12 @@ using namespace llvm;
 namespace {
   class VISIBILITY_HIDDEN EdgeProfiler : public ModulePass {
     bool runOnModule(Module &M);
+  public:
+    static const int ID; // Pass identifcation, replacement for typeid
+    EdgeProfiler() : ModulePass((intptr_t)&ID) {}
   };
 
+  const int EdgeProfiler::ID = 0;
   RegisterPass<EdgeProfiler> X("insert-edge-profiling",
                                "Insert instrumentation for edge profiling");
 }