diff options
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcRegInfo.cpp')
| -rw-r--r-- | llvm/lib/Target/Sparc/SparcRegInfo.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Target/Sparc/SparcRegInfo.cpp b/llvm/lib/Target/Sparc/SparcRegInfo.cpp index 434816e0a6b..8ec23991083 100644 --- a/llvm/lib/Target/Sparc/SparcRegInfo.cpp +++ b/llvm/lib/Target/Sparc/SparcRegInfo.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(); } |

