Convert to use new style casts instead of direct checking
authorChris Lattner <sabre@nondot.org>
Tue, 26 Mar 2002 17:58:12 +0000 (17:58 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 26 Mar 2002 17:58:12 +0000 (17:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1990 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SparcV9/SparcV9InstrSelection.cpp

index 2ecae9e211742592354455fd79b8d9e8563c4183..533c8cf721129a328570f1b65742981b7897b3a9 100644 (file)
@@ -2105,7 +2105,7 @@ GetInstructionsByRule(InstructionNode* subtreeRoot,
         // the PC-relative address fits in the CALL address field (22 bits).
         // Use JMPL for indirect calls.
         // 
-        if (callee->getValueType() == Value::MethodVal)
+        if (isa<Function>(callee))
           { // direct function call
             M = new MachineInstr(CALL);
             M->SetMachineOperandVal(0, MachineOperand::MO_PCRelativeDisp,
@@ -2133,7 +2133,7 @@ GetInstructionsByRule(InstructionNode* subtreeRoot,
           mvec.back()->addImplicitRef(callInstr, /*isDef*/ true);
         
         // For the CALL instruction, the ret. addr. reg. is also implicit
-        if (callee->getValueType() == Value::MethodVal)
+        if (isa<Function>(callee))
           mvec.back()->addImplicitRef(retAddrReg, /*isDef*/ true);
         
         // delay slot