Change Constant::getNullConstant to Constant::getNullValue


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2323 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/SparcV9/SparcV9InstrSelection.cpp b/lib/Target/SparcV9/SparcV9InstrSelection.cpp
index 5e6aafd..9906e5b 100644
--- a/lib/Target/SparcV9/SparcV9InstrSelection.cpp
+++ b/lib/Target/SparcV9/SparcV9InstrSelection.cpp
@@ -1205,11 +1205,10 @@
       // Use (unsigned long) 0 for a NULL pointer value.
       // 
       const Type* zeroValueType =
-        (resultType->getPrimitiveID() == Type::PointerTyID)? Type::ULongTy
-                                                           : resultType;
+        isa<PointerType>(resultType) ? Type::ULongTy : resultType;
       MachineInstr* minstr = new MachineInstr(opCode);
       minstr->SetMachineOperandVal(0, MachineOperand::MO_VirtualRegister,
-                                   Constant::getNullConstant(zeroValueType));
+                                   Constant::getNullValue(zeroValueType));
       minstr->SetMachineOperandVal(1, MachineOperand::MO_VirtualRegister, src);
       minstr->SetMachineOperandVal(2, MachineOperand::MO_VirtualRegister,dest);
       minstrVec.push_back(minstr);