Do not use typeinfo to identify pass in pass manager.

llvm-svn: 36632
diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
index 7a3eac7..738db80 100644
--- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
@@ -39,7 +39,9 @@
     /// transformation profitability.
     const TargetLowering *TLI;
   public:
-    CodeGenPrepare(const TargetLowering *tli = 0) : TLI(tli) {}
+    static const int ID; // Pass identifcation, replacement for typeid
+    CodeGenPrepare(const TargetLowering *tli = 0) : FunctionPass((intptr_t)&ID),
+      TLI(tli) {}
     bool runOnFunction(Function &F);
     
   private:
@@ -52,6 +54,8 @@
                                DenseMap<Value*,Value*> &SunkAddrs);
   };
 }
+
+const int CodeGenPrepare::ID = 0;
 static RegisterPass<CodeGenPrepare> X("codegenprepare",
                                       "Optimize for code generation");