From: Chris Lattner Date: Sat, 27 Apr 2002 03:14:39 +0000 (+0000) Subject: Use the cast<> operator in favor of C style casts X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=35504209a0ddbc70d97a7ef16c504acc863bfeec;p=oota-llvm.git Use the cast<> operator in favor of C style casts git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2331 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/SparcV9/SparcV9InstrSelection.cpp b/lib/Target/SparcV9/SparcV9InstrSelection.cpp index 9906e5b1091..cff0a845c2f 100644 --- a/lib/Target/SparcV9/SparcV9InstrSelection.cpp +++ b/lib/Target/SparcV9/SparcV9InstrSelection.cpp @@ -1461,7 +1461,7 @@ GetInstructionsByRule(InstructionNode* subtreeRoot, M->SetMachineOperandVal(0, MachineOperand::MO_CCRegister, (Value*) NULL); M->SetMachineOperandVal(1, MachineOperand::MO_PCRelativeDisp, - ((BranchInst*) subtreeRoot->getInstruction())->getSuccessor(dest)); + cast(subtreeRoot->getInstruction())->getSuccessor(dest)); mvec.push_back(M); // delay slot @@ -1477,7 +1477,7 @@ GetInstructionsByRule(InstructionNode* subtreeRoot, M->SetMachineOperandVal(0, MachineOperand::MO_VirtualRegister, subtreeRoot->leftChild()->getValue()); M->SetMachineOperandVal(1, MachineOperand::MO_PCRelativeDisp, - ((BranchInst*) subtreeRoot->getInstruction())->getSuccessor(0)); + cast(subtreeRoot->getInstruction())->getSuccessor(0)); mvec.push_back(M); // delay slot @@ -1488,7 +1488,7 @@ GetInstructionsByRule(InstructionNode* subtreeRoot, M->SetMachineOperandVal(0, MachineOperand::MO_CCRegister, (Value*) NULL); M->SetMachineOperandVal(1, MachineOperand::MO_PCRelativeDisp, - ((BranchInst*) subtreeRoot->getInstruction())->getSuccessor(1)); + cast(subtreeRoot->getInstruction())->getSuccessor(1)); mvec.push_back(M); // delay slot