Do not use typeinfo to identify pass in pass manager.
[oota-llvm.git] / lib / Transforms / Scalar / BasicBlockPlacement.cpp
index 14de1f1f4754571e5c121d4469b29b04becf545f..a560d559bd920cd15904c9a718fedc2ee11855da 100644 (file)
@@ -41,6 +41,9 @@ STATISTIC(NumMoved, "Number of basic blocks moved");
 
 namespace {
   struct VISIBILITY_HIDDEN BlockPlacement : public FunctionPass {
+    static const int ID; // Pass identifcation, replacement for typeid
+    BlockPlacement() : FunctionPass((intptr_t)&ID) {}
+
     virtual bool runOnFunction(Function &F);
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
@@ -70,6 +73,7 @@ namespace {
     void PlaceBlocks(BasicBlock *BB);
   };
 
+  const int BlockPlacement::ID = 0;
   RegisterPass<BlockPlacement> X("block-placement",
                                  "Profile Guided Basic Block Placement");
 }