[llvm-commits] CVS: llvm/lib/Target/MSIL/MSILWriter.cpp MSILWriter.h

Devang Patel dpatel at apple.com
Wed May 2 14:41:27 PDT 2007



Changes in directory llvm/lib/Target/MSIL:

MSILWriter.cpp updated: 1.5 -> 1.6
MSILWriter.h updated: 1.3 -> 1.4
---
Log message:

Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces 
static const int, which defauts PassID based pass identification.


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

 MSILWriter.cpp |    4 ++--
 MSILWriter.h   |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/lib/Target/MSIL/MSILWriter.cpp
diff -u llvm/lib/Target/MSIL/MSILWriter.cpp:1.5 llvm/lib/Target/MSIL/MSILWriter.cpp:1.6
--- llvm/lib/Target/MSIL/MSILWriter.cpp:1.5	Tue May  1 16:15:46 2007
+++ llvm/lib/Target/MSIL/MSILWriter.cpp	Wed May  2 16:39:19 2007
@@ -80,8 +80,8 @@
   return Changed;
 }
 
-const int MSILModule::ID = 0;
-const int MSILWriter::ID = 0;
+const char MSILModule::ID = 0;
+const char MSILWriter::ID = 0;
 
 bool MSILWriter::runOnFunction(Function &F) {
   if (F.isDeclaration()) return false;


Index: llvm/lib/Target/MSIL/MSILWriter.h
diff -u llvm/lib/Target/MSIL/MSILWriter.h:1.3 llvm/lib/Target/MSIL/MSILWriter.h:1.4
--- llvm/lib/Target/MSIL/MSILWriter.h:1.3	Tue May  1 16:15:46 2007
+++ llvm/lib/Target/MSIL/MSILWriter.h	Wed May  2 16:39:19 2007
@@ -37,7 +37,7 @@
     const TargetData*& TD;
 
   public:
-    static const int ID;
+    static const char ID;
     MSILModule(const std::set<const Type *>*& _UsedTypes,
                const TargetData*& _TD)
       : ModulePass((intptr_t)&ID), UsedTypes(_UsedTypes), TD(_TD) {}
@@ -83,7 +83,7 @@
     std::map<const GlobalVariable*,std::vector<StaticInitializer> >
       StaticInitList;
     const std::set<const Type *>* UsedTypes;
-    static const int ID;
+    static const char ID;
     MSILWriter(std::ostream &o) : FunctionPass((intptr_t)&ID), Out(o) {
       UniqID = 0;
     }






More information about the llvm-commits mailing list