[llvm-commits] CVS: llvm/include/llvm/Bytecode/WriteBytecodePass.h

Devang Patel dpatel at apple.com
Tue May 1 14:18:00 PDT 2007



Changes in directory llvm/include/llvm/Bytecode:

WriteBytecodePass.h updated: 1.19 -> 1.20
---
Log message:

Do not use typeinfo to identify pass in pass manager.


---
Diffs of the changes:  (+4 -2)

 WriteBytecodePass.h |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/Bytecode/WriteBytecodePass.h
diff -u llvm/include/llvm/Bytecode/WriteBytecodePass.h:1.19 llvm/include/llvm/Bytecode/WriteBytecodePass.h:1.20
--- llvm/include/llvm/Bytecode/WriteBytecodePass.h:1.19	Sun Jan 21 00:31:34 2007
+++ llvm/include/llvm/Bytecode/WriteBytecodePass.h	Tue May  1 16:15:46 2007
@@ -26,10 +26,12 @@
   bool DeleteStream;
   bool CompressFile;
 public:
+  static const int ID; // Pass identifcation, replacement for typeid
   WriteBytecodePass()
-    : Out(&cout), DeleteStream(false), CompressFile(false) {}
+    : ModulePass((intptr_t) &ID), Out(&cout), DeleteStream(false), 
+      CompressFile(false) {}
   WriteBytecodePass(OStream *o, bool DS = false, bool CF = false)
-    : Out(o), DeleteStream(DS), CompressFile(CF) {}
+    : ModulePass((intptr_t) &ID), Out(o), DeleteStream(DS), CompressFile(CF) {}
 
   inline ~WriteBytecodePass() {
     if (DeleteStream) delete Out;






More information about the llvm-commits mailing list