Add comment.
[oota-llvm.git] / lib / Transforms / Scalar / BasicBlockPlacement.cpp
index 020b2b2c52e543261522240660cfd62109febff0..9bde749035750f5189f0271d6316eb85eba45fbb 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -31,6 +31,7 @@
 #include "llvm/Function.h"
 #include "llvm/Pass.h"
 #include "llvm/Support/CFG.h"
+#include "llvm/Support/Compiler.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Transforms/Scalar.h"
 #include <set>
@@ -39,7 +40,10 @@ using namespace llvm;
 STATISTIC(NumMoved, "Number of basic blocks moved");
 
 namespace {
-  struct BlockPlacement : public FunctionPass {
+  struct VISIBILITY_HIDDEN BlockPlacement : public FunctionPass {
+    static char ID; // Pass identification, replacement for typeid
+    BlockPlacement() : FunctionPass((intptr_t)&ID) {}
+
     virtual bool runOnFunction(Function &F);
 
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
@@ -69,6 +73,7 @@ namespace {
     void PlaceBlocks(BasicBlock *BB);
   };
 
+  char BlockPlacement::ID = 0;
   RegisterPass<BlockPlacement> X("block-placement",
                                  "Profile Guided Basic Block Placement");
 }