[llvm-commits] CVS: llvm/lib/Target/ARM/ARMConstantIslandPass.cpp ARMLoadStoreOptimizer.cpp

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



Changes in directory llvm/lib/Target/ARM:

ARMConstantIslandPass.cpp updated: 1.40 -> 1.41
ARMLoadStoreOptimizer.cpp updated: 1.9 -> 1.10
---
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)

 ARMConstantIslandPass.cpp |    4 ++--
 ARMLoadStoreOptimizer.cpp |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
diff -u llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:1.40 llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:1.41
--- llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:1.40	Tue May  1 16:15:46 2007
+++ llvm/lib/Target/ARM/ARMConstantIslandPass.cpp	Wed May  2 16:39:19 2007
@@ -128,7 +128,7 @@
     ARMFunctionInfo *AFI;
     bool isThumb;
   public:
-    static const int ID;
+    static const char ID;
     ARMConstantIslands() : MachineFunctionPass((intptr_t)&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &Fn);
@@ -174,7 +174,7 @@
     void dumpBBs();
     void verify(MachineFunction &Fn);
   };
-  const int ARMConstantIslands::ID = 0;
+  const char ARMConstantIslands::ID = 0;
 }
 
 /// verify - check BBOffsets, BBSizes, alignment of islands


Index: llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
diff -u llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp:1.9 llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp:1.10
--- llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp:1.9	Tue May  1 16:15:46 2007
+++ llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp	Wed May  2 16:39:19 2007
@@ -38,7 +38,7 @@
 
 namespace {
   struct VISIBILITY_HIDDEN ARMLoadStoreOpt : public MachineFunctionPass {
-    static const int ID;
+    static const char ID;
     ARMLoadStoreOpt() : MachineFunctionPass((intptr_t)&ID) {}
 
     const TargetInstrInfo *TII;
@@ -73,7 +73,7 @@
     bool LoadStoreMultipleOpti(MachineBasicBlock &MBB);
     bool MergeReturnIntoLDM(MachineBasicBlock &MBB);
   };
-  const int ARMLoadStoreOpt::ID = 0;
+  const char ARMLoadStoreOpt::ID = 0;
 }
 
 /// createARMLoadStoreOptimizationPass - returns an instance of the load / store






More information about the llvm-commits mailing list