Do not use typeinfo to identify pass in pass manager.
[oota-llvm.git] / include / llvm / Bytecode / WriteBytecodePass.h
index c4e2c5d5d5c9788cfe33c578f448570dbd3d789d..5c21ccded5de2d97eddb27fcaca9c1ccae071001 100644 (file)
@@ -26,10 +26,12 @@ class WriteBytecodePass : public ModulePass {
   bool DeleteStream;
   bool CompressFile;
 public:
+  static const int ID; // Pass identifcation, replacement for typeid
   WriteBytecodePass()
-    : Out(&cout), DeleteStream(false), CompressFile(true) {}
-  WriteBytecodePass(OStream *o, bool DS = false, bool CF = true)
-    : Out(o), DeleteStream(DS), CompressFile(CF) {}
+    : ModulePass((intptr_t) &ID), Out(&cout), DeleteStream(false), 
+      CompressFile(false) {}
+  WriteBytecodePass(OStream *o, bool DS = false, bool CF = false)
+    : ModulePass((intptr_t) &ID), Out(o), DeleteStream(DS), CompressFile(CF) {}
 
   inline ~WriteBytecodePass() {
     if (DeleteStream) delete Out;