diff options
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/SparcV9/SparcV9InstrSelection.cpp | 6 | ||||
-rw-r--r-- | lib/Target/SparcV9/SparcV9RegInfo.cpp | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/lib/Target/SparcV9/SparcV9InstrSelection.cpp b/lib/Target/SparcV9/SparcV9InstrSelection.cpp index 18b4a0a..7b6e597 100644 --- a/lib/Target/SparcV9/SparcV9InstrSelection.cpp +++ b/lib/Target/SparcV9/SparcV9InstrSelection.cpp @@ -327,9 +327,9 @@ ChooseAddInstructionByType(const Type* resultType) MachineOpCode opCode = INVALID_OPCODE; if (resultType->isIntegral() || - resultType->isPointerType() || - resultType->isLabelType() || - isa<MethodType>(resultType) || + isa<PointerType>(resultType) || + isa<FunctionType>(resultType) || + resultType == Type::LabelTy || resultType == Type::BoolTy) { opCode = ADD; diff --git a/lib/Target/SparcV9/SparcV9RegInfo.cpp b/lib/Target/SparcV9/SparcV9RegInfo.cpp index 434816e..8ec2399 100644 --- a/lib/Target/SparcV9/SparcV9RegInfo.cpp +++ b/lib/Target/SparcV9/SparcV9RegInfo.cpp @@ -264,10 +264,8 @@ bool UltraSparcRegInfo::isVarArgCall(const MachineInstr *CallMI) const { const MachineOperand & calleeOp = CallMI->getOperand(0); Value *calleeVal = calleeOp.getVRegValue(); - PointerType *PT = cast<PointerType> (calleeVal->getType()); - MethodType *MT = cast<MethodType>(PT->getElementType()); - - return MT->isVarArg(); + PointerType *PT = cast<PointerType>(calleeVal->getType()); + return cast<FunctionType>(PT->getElementType())->isVarArg(); } |