aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-01 16:18:37 +0000
committerChris Lattner <sabre@nondot.org>2001-10-01 16:18:37 +0000
commit9636a91649f168f41b477cba705287665e054f79 (patch)
tree5922b723abd6338e86c5c09ecb880f129cd85401 /lib/Target
parent7295eb4ea3e3a81e697600cbca681674e4b35a20 (diff)
downloadexternal_llvm-9636a91649f168f41b477cba705287665e054f79.zip
external_llvm-9636a91649f168f41b477cba705287665e054f79.tar.gz
external_llvm-9636a91649f168f41b477cba705287665e054f79.tar.bz2
Add support for new style casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@694 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/SparcV9/InstrSched/SchedGraph.cpp2
-rw-r--r--lib/Target/SparcV9/SparcV9AsmPrinter.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/SparcV9/InstrSched/SchedGraph.cpp b/lib/Target/SparcV9/InstrSched/SchedGraph.cpp
index 2656cd2..4060130 100644
--- a/lib/Target/SparcV9/InstrSched/SchedGraph.cpp
+++ b/lib/Target/SparcV9/InstrSched/SchedGraph.cpp
@@ -535,7 +535,7 @@ SchedGraph::addSSAEdge(SchedGraphNode* node,
if (!val->isInstruction()) return;
const Instruction* thisVMInstr = node->getInstr();
- const Instruction* defVMInstr = val->castInstructionAsserting();
+ const Instruction* defVMInstr = cast<const Instruction>(val);
// Phi instructions are the only ones that produce a value but don't get
// any non-dummy machine instructions. Return here as an optimization.
diff --git a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
index c37dae1..9001c74 100644
--- a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
+++ b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
@@ -158,8 +158,8 @@ void SparcAsmPrinter::emitMachineInst(const MachineInstr *MI) {
const Value *Val = Op.getVRegValue();
if (!Val) {
Out << "\t<*NULL Value*>";
- } else if (Val->isBasicBlock()) {
- Out << getID(Val->castBasicBlockAsserting());
+ } else if (const BasicBlock *BB = dyn_cast<const BasicBlock>(Val)) {
+ Out << getID(BB);
} else {
Out << "<unknown value=" << Val << ">";
}