aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-27 03:14:39 +0000
committerChris Lattner <sabre@nondot.org>2002-04-27 03:14:39 +0000
commit35504209a0ddbc70d97a7ef16c504acc863bfeec (patch)
tree2a3aca48648657d73a893a503198af7081f887ed /lib
parent59c2614eae2dc1a84d332c9592ddc0dbd39059af (diff)
downloadexternal_llvm-35504209a0ddbc70d97a7ef16c504acc863bfeec.zip
external_llvm-35504209a0ddbc70d97a7ef16c504acc863bfeec.tar.gz
external_llvm-35504209a0ddbc70d97a7ef16c504acc863bfeec.tar.bz2
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
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/SparcV9/SparcV9InstrSelection.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/SparcV9/SparcV9InstrSelection.cpp b/lib/Target/SparcV9/SparcV9InstrSelection.cpp
index 9906e5b..cff0a84 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<BranchInst>(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<BranchInst>(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<BranchInst>(subtreeRoot->getInstruction())->getSuccessor(1));
mvec.push_back(M);
// delay slot