From e6dd75604ef8362baf9f14cfea691a39c5ec0110 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 27 Apr 2002 03:14:39 +0000 Subject: Use the cast<> operator in favor of C style casts llvm-svn: 2331 --- llvm/lib/Target/Sparc/SparcInstrSelection.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib') diff --git a/llvm/lib/Target/Sparc/SparcInstrSelection.cpp b/llvm/lib/Target/Sparc/SparcInstrSelection.cpp index 9906e5b1091..cff0a845c2f 100644 --- a/llvm/lib/Target/Sparc/SparcInstrSelection.cpp +++ b/llvm/lib/Target/Sparc/SparcInstrSelection.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 -- cgit v1.2.3