Do not use typeinfo to identify pass in pass manager.
[oota-llvm.git] / lib / Transforms / Scalar / LoopRotation.cpp
index b9db3f6f90cf7cee5aedb04101969167684a341e..8abd96eb06fea5af30d96d26732a84c7f4a0ad51 100644 (file)
@@ -44,7 +44,9 @@ namespace {
   class VISIBILITY_HIDDEN LoopRotate : public LoopPass {
 
   public:
-    
+    static const int ID; // Pass ID, replacement for typeid
+    LoopRotate() : LoopPass((intptr_t)&ID) {}
+
     // Rotate Loop L as many times as possible. Return true if
     // loop is rotated at least once.
     bool runOnLoop(Loop *L, LPPassManager &LPM);
@@ -92,6 +94,7 @@ namespace {
     SmallVector<RenameData, MAX_HEADER_SIZE> LoopHeaderInfo;
   };
   
+  const int LoopRotate::ID = 0;
   RegisterPass<LoopRotate> X ("loop-rotate", "Rotate Loops");
 }