diff options
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcInstrSelection.cpp')
| -rw-r--r-- | llvm/lib/Target/Sparc/SparcInstrSelection.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/Sparc/SparcInstrSelection.cpp b/llvm/lib/Target/Sparc/SparcInstrSelection.cpp index 5e6aafd9e28..9906e5b1091 100644 --- a/llvm/lib/Target/Sparc/SparcInstrSelection.cpp +++ b/llvm/lib/Target/Sparc/SparcInstrSelection.cpp @@ -1205,11 +1205,10 @@ CreateCopyInstructionsByType(const TargetMachine& target, // 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); |

