[llvm-commits] [llvm] r109224 - in /llvm/trunk/lib/Target: MSP430/MSP430BranchSelector.cpp PowerPC/PPCBranchSelector.cpp

Gabor Greif ggreif at gmail.com
Fri Jul 23 06:28:47 PDT 2010


Author: ggreif
Date: Fri Jul 23 08:28:47 2010
New Revision: 109224

URL: http://llvm.org/viewvc/llvm-project?rev=109224&view=rev
Log:
fix constness warnings

Modified:
    llvm/trunk/lib/Target/MSP430/MSP430BranchSelector.cpp
    llvm/trunk/lib/Target/PowerPC/PPCBranchSelector.cpp

Modified: llvm/trunk/lib/Target/MSP430/MSP430BranchSelector.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430BranchSelector.cpp?rev=109224&r1=109223&r2=109224&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MSP430/MSP430BranchSelector.cpp (original)
+++ llvm/trunk/lib/Target/MSP430/MSP430BranchSelector.cpp Fri Jul 23 08:28:47 2010
@@ -52,7 +52,8 @@
 }
 
 bool MSP430BSel::runOnMachineFunction(MachineFunction &Fn) {
-  const MSP430InstrInfo *TII = (MSP430InstrInfo*)Fn.getTarget().getInstrInfo();
+  const MSP430InstrInfo *TII =
+             static_cast<const MSP430InstrInfo*>(Fn.getTarget().getInstrInfo());
   // Give the blocks of the function a dense, in-order, numbering.
   Fn.RenumberBlocks();
   BlockSizes.resize(Fn.getNumBlockIDs());

Modified: llvm/trunk/lib/Target/PowerPC/PPCBranchSelector.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCBranchSelector.cpp?rev=109224&r1=109223&r2=109224&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCBranchSelector.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCBranchSelector.cpp Fri Jul 23 08:28:47 2010
@@ -53,7 +53,8 @@
 }
 
 bool PPCBSel::runOnMachineFunction(MachineFunction &Fn) {
-  const PPCInstrInfo *TII = (PPCInstrInfo*)Fn.getTarget().getInstrInfo();
+  const PPCInstrInfo *TII =
+                static_cast<const PPCInstrInfo*>(Fn.getTarget().getInstrInfo());
   // Give the blocks of the function a dense, in-order, numbering.
   Fn.RenumberBlocks();
   BlockSizes.resize(Fn.getNumBlockIDs());





More information about the llvm-commits mailing list