fix constness warnings
authorGabor Greif <ggreif@gmail.com>
Fri, 23 Jul 2010 13:28:47 +0000 (13:28 +0000)
committerGabor Greif <ggreif@gmail.com>
Fri, 23 Jul 2010 13:28:47 +0000 (13:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109224 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/MSP430/MSP430BranchSelector.cpp
lib/Target/PowerPC/PPCBranchSelector.cpp

index 350b6751182024b9e4bac0e0805f2b15b5b5d9ac..529fd931f65a5494afd3a6752f8329e215631719 100644 (file)
@@ -52,7 +52,8 @@ FunctionPass *llvm::createMSP430BranchSelectionPass() {
 }
 
 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());
index ab251e6b330091acc2c3d95cd9ea9ad48b39a51a..8c427a1c78ba6c71225608be856b22989941c2bf 100644 (file)
@@ -53,7 +53,8 @@ FunctionPass *llvm::createPPCBranchSelectionPass() {
 }
 
 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());