diff options
author | Vasileios Kalintiris <Vasileios.Kalintiris@imgtec.com> | 2015-10-26 14:24:30 +0000 |
---|---|---|
committer | Vasileios Kalintiris <Vasileios.Kalintiris@imgtec.com> | 2015-10-26 14:24:30 +0000 |
commit | 165121f3261133eb9c587d6ac68a31a59f79891b (patch) | |
tree | 71e4029f763f2247a228bf3e2eaba98f23beea93 /llvm/lib/Target/Mips/MipsISelLowering.cpp | |
parent | 493e57de01ecabc7af76a64cf39992d12efffca0 (diff) | |
download | bcm5719-llvm-165121f3261133eb9c587d6ac68a31a59f79891b.tar.gz bcm5719-llvm-165121f3261133eb9c587d6ac68a31a59f79891b.zip |
[mips] Check for the correct error message in tests for interrupt attributes.
Instead of XFAIL-ing the tests with the wrong usage of the "interrupt"
attribute, we should check that we emit the correct error messages to
the user.
llvm-svn: 251295
Diffstat (limited to 'llvm/lib/Target/Mips/MipsISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/Mips/MipsISelLowering.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/Mips/MipsISelLowering.cpp b/llvm/lib/Target/Mips/MipsISelLowering.cpp index a36725a9208..7e8bccddca5 100644 --- a/llvm/lib/Target/Mips/MipsISelLowering.cpp +++ b/llvm/lib/Target/Mips/MipsISelLowering.cpp @@ -2952,9 +2952,9 @@ MipsTargetLowering::LowerFormalArguments(SDValue Chain, const Function *Func = DAG.getMachineFunction().getFunction(); Function::const_arg_iterator FuncArg = Func->arg_begin(); - if (Func->hasFnAttribute("interrupt")) - assert(Func->arg_empty() && - "Functions with the interrupt attribute cannot have arguments!"); + if (Func->hasFnAttribute("interrupt") && !Func->arg_empty()) + report_fatal_error( + "Functions with the interrupt attribute cannot have arguments!"); CCInfo.AnalyzeFormalArguments(Ins, CC_Mips_FixedArg); MipsFI->setFormalArgInfo(CCInfo.getNextStackOffset(), |