[llvm-commits] CVS: llvm/lib/Target/X86/X86CodeEmitter.cpp X86FloatingPoint.cpp

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



Changes in directory llvm/lib/Target/X86:

X86CodeEmitter.cpp updated: 1.134 -> 1.135
X86FloatingPoint.cpp updated: 1.69 -> 1.70
---
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)

 X86CodeEmitter.cpp   |    4 ++--
 X86FloatingPoint.cpp |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/lib/Target/X86/X86CodeEmitter.cpp
diff -u llvm/lib/Target/X86/X86CodeEmitter.cpp:1.134 llvm/lib/Target/X86/X86CodeEmitter.cpp:1.135
--- llvm/lib/Target/X86/X86CodeEmitter.cpp:1.134	Tue May  1 16:15:46 2007
+++ llvm/lib/Target/X86/X86CodeEmitter.cpp	Wed May  2 16:39:19 2007
@@ -39,7 +39,7 @@
     MachineCodeEmitter  &MCE;
     bool Is64BitMode;
   public:
-    static const int ID;
+    static const char ID;
     explicit Emitter(TargetMachine &tm, MachineCodeEmitter &mce)
       : MachineFunctionPass((intptr_t)&ID), II(0), TD(0), TM(tm), 
       MCE(mce), Is64BitMode(false) {}
@@ -82,7 +82,7 @@
     bool isX86_64ExtendedReg(const MachineOperand &MO);
     unsigned determineREX(const MachineInstr &MI);
   };
-  const int Emitter::ID = 0;
+  const char Emitter::ID = 0;
 }
 
 /// createX86CodeEmitterPass - Return a pass that emits the collected X86 code


Index: llvm/lib/Target/X86/X86FloatingPoint.cpp
diff -u llvm/lib/Target/X86/X86FloatingPoint.cpp:1.69 llvm/lib/Target/X86/X86FloatingPoint.cpp:1.70
--- llvm/lib/Target/X86/X86FloatingPoint.cpp:1.69	Tue May  1 16:15:46 2007
+++ llvm/lib/Target/X86/X86FloatingPoint.cpp	Wed May  2 16:39:19 2007
@@ -52,7 +52,7 @@
 
 namespace {
   struct VISIBILITY_HIDDEN FPS : public MachineFunctionPass {
-    static const int ID;
+    static const char ID;
     FPS() : MachineFunctionPass((intptr_t)&ID) {}
 
     virtual bool runOnMachineFunction(MachineFunction &MF);
@@ -154,7 +154,7 @@
     void handleCondMovFP(MachineBasicBlock::iterator &I);
     void handleSpecialFP(MachineBasicBlock::iterator &I);
   };
-  const int FPS::ID = 0;
+  const char FPS::ID = 0;
 }
 
 FunctionPass *llvm::createX86FloatingPointStackifierPass() { return new FPS(); }






More information about the llvm-commits mailing list