summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/CallingConvLower.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/CallingConvLower.cpp')
-rw-r--r--llvm/lib/CodeGen/CallingConvLower.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/CallingConvLower.cpp b/llvm/lib/CodeGen/CallingConvLower.cpp
index 92da621fabb..39eabd92690 100644
--- a/llvm/lib/CodeGen/CallingConvLower.cpp
+++ b/llvm/lib/CodeGen/CallingConvLower.cpp
@@ -89,13 +89,8 @@ CCState::AnalyzeFormalArguments(const SmallVectorImpl<ISD::InputArg> &Ins,
for (unsigned i = 0; i != NumArgs; ++i) {
MVT ArgVT = Ins[i].VT;
ISD::ArgFlagsTy ArgFlags = Ins[i].Flags;
- if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this)) {
-#ifndef NDEBUG
- dbgs() << "Formal argument #" << i << " has unhandled type "
- << EVT(ArgVT).getEVTString() << '\n';
-#endif
- llvm_unreachable(nullptr);
- }
+ if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this))
+ report_fatal_error("unable to allocate function argument #" + Twine(i));
}
}
@@ -121,13 +116,8 @@ void CCState::AnalyzeReturn(const SmallVectorImpl<ISD::OutputArg> &Outs,
for (unsigned i = 0, e = Outs.size(); i != e; ++i) {
MVT VT = Outs[i].VT;
ISD::ArgFlagsTy ArgFlags = Outs[i].Flags;
- if (Fn(i, VT, VT, CCValAssign::Full, ArgFlags, *this)) {
-#ifndef NDEBUG
- dbgs() << "Return operand #" << i << " has unhandled type "
- << EVT(VT).getEVTString() << '\n';
-#endif
- llvm_unreachable(nullptr);
- }
+ if (Fn(i, VT, VT, CCValAssign::Full, ArgFlags, *this))
+ report_fatal_error("unable to allocate function return #" + Twine(i));
}
}
OpenPOWER on IntegriCloud