aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/InstrSelection
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-10-01 20:11:19 +0000
committerChris Lattner <sabre@nondot.org>2001-10-01 20:11:19 +0000
commit1d87bcf4909b06dcd86320722653341f08b8b396 (patch)
treec96a6176090b950f14ac44061b68f243a1920fe3 /lib/CodeGen/InstrSelection
parentcfe26c930ae691ff3012736555846c45087e1a9e (diff)
Convert more code to use new style casts
Eliminate old style casts from value.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@696 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/InstrSelection')
-rw-r--r--lib/CodeGen/InstrSelection/InstrForest.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/CodeGen/InstrSelection/InstrForest.cpp b/lib/CodeGen/InstrSelection/InstrForest.cpp
index 9f4df08d38..f5a524707b 100644
--- a/lib/CodeGen/InstrSelection/InstrForest.cpp
+++ b/lib/CodeGen/InstrSelection/InstrForest.cpp
@@ -275,12 +275,12 @@ InstrForest::buildTreeForInstruction(Instruction *instr)
// Check latter condition here just to simplify the next IF.
bool includeAddressOperand =
- (operand->isBasicBlock() || operand->isMethod())
+ (isa<BasicBlock>(operand) || isa<Method>(operand))
&& !instr->isTerminator();
- if (includeAddressOperand || operand->isInstruction() ||
- operand->isConstant() || operand->isMethodArgument() ||
- operand->isGlobal())
+ if (includeAddressOperand || isa<Instruction>(operand) ||
+ isa<ConstPoolVal>(operand) || isa<MethodArgument>(operand) ||
+ isa<GlobalVariable>(operand))
{
// This operand is a data value
@@ -300,15 +300,15 @@ InstrForest::buildTreeForInstruction(Instruction *instr)
// is used directly, i.e., made a child of the instruction node.
//
InstrTreeNode* opTreeNode;
- if (operand->isInstruction() && operand->use_size() == 1 &&
- ((Instruction*)operand)->getParent() == instr->getParent() &&
+ if (isa<Instruction>(operand) && operand->use_size() == 1 &&
+ cast<Instruction>(operand)->getParent() == instr->getParent() &&
! instr->isPHINode() &&
instr->getOpcode() != Instruction::Call)
{
// Recursively create a treeNode for it.
opTreeNode = buildTreeForInstruction((Instruction*)operand);
}
- else if (ConstPoolVal *CPV = operand->castConstant())
+ else if (ConstPoolVal *CPV = dyn_cast<ConstPoolVal>(operand))
{
// Create a leaf node for a constant
opTreeNode = new ConstantNode(CPV);