aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/CallingConvLower.cpp
diff options
context:
space:
mode:
authorTorok Edwin <edwintorok@gmail.com>2009-07-14 16:55:14 +0000
committerTorok Edwin <edwintorok@gmail.com>2009-07-14 16:55:14 +0000
commitc23197a26f34f559ea9797de51e187087c039c42 (patch)
treebf497ec9a02cd2fc0b64e3e58eff037a719a854d /lib/CodeGen/SelectionDAG/CallingConvLower.cpp
parent1f316e321a8f2fa0e193c5444584a67a8aabe9a8 (diff)
llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75640 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/CallingConvLower.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/CallingConvLower.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/lib/CodeGen/SelectionDAG/CallingConvLower.cpp b/lib/CodeGen/SelectionDAG/CallingConvLower.cpp
index 9289711e6e..2f4db28d64 100644
--- a/lib/CodeGen/SelectionDAG/CallingConvLower.cpp
+++ b/lib/CodeGen/SelectionDAG/CallingConvLower.cpp
@@ -67,11 +67,11 @@ void CCState::AnalyzeFormalArguments(SDNode *TheArgs, CCAssignFn Fn) {
ISD::ArgFlagsTy ArgFlags =
cast<ARG_FLAGSSDNode>(TheArgs->getOperand(3+i))->getArgFlags();
if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this)) {
- std::string msg;
- raw_string_ostream Msg(msg);
- Msg << "Formal argument #" << i << " has unhandled type "
+#ifndef NDEBUG
+ cerr << "Formal argument #" << i << " has unhandled type "
<< ArgVT.getMVTString();
- llvm_report_error(Msg.str());
+#endif
+ llvm_unreachable(0);
}
}
}
@@ -84,12 +84,12 @@ void CCState::AnalyzeReturn(SDNode *TheRet, CCAssignFn Fn) {
MVT VT = TheRet->getOperand(i*2+1).getValueType();
ISD::ArgFlagsTy ArgFlags =
cast<ARG_FLAGSSDNode>(TheRet->getOperand(i*2+2))->getArgFlags();
- if (Fn(i, VT, VT, CCValAssign::Full, ArgFlags, *this)){
- std::string msg;
- raw_string_ostream Msg(msg);
- Msg << "Return operand #" << i << " has unhandled type "
+ if (Fn(i, VT, VT, CCValAssign::Full, ArgFlags, *this)) {
+#ifndef NDEBUG
+ cerr << "Return operand #" << i << " has unhandled type "
<< VT.getMVTString();
- llvm_report_error(Msg.str());
+#endif
+ llvm_unreachable(0);
}
}
}
@@ -103,11 +103,11 @@ void CCState::AnalyzeCallOperands(CallSDNode *TheCall, CCAssignFn Fn) {
MVT ArgVT = TheCall->getArg(i).getValueType();
ISD::ArgFlagsTy ArgFlags = TheCall->getArgFlags(i);
if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this)) {
- std::string msg;
- raw_string_ostream Msg(msg);
- Msg << "Call operand #" << i << " has unhandled type "
+#ifndef NDEBUG
+ cerr << "Call operand #" << i << " has unhandled type "
<< ArgVT.getMVTString();
- llvm_report_error(Msg.str());
+#endif
+ llvm_unreachable(0);
}
}
}
@@ -122,11 +122,11 @@ void CCState::AnalyzeCallOperands(SmallVectorImpl<MVT> &ArgVTs,
MVT ArgVT = ArgVTs[i];
ISD::ArgFlagsTy ArgFlags = Flags[i];
if (Fn(i, ArgVT, ArgVT, CCValAssign::Full, ArgFlags, *this)) {
- std::string msg;
- raw_string_ostream Msg(msg);
- Msg << "Call operand #" << i << " has unhandled type "
+#ifndef NDEBUG
+ cerr << "Call operand #" << i << " has unhandled type "
<< ArgVT.getMVTString();
- llvm_report_error(Msg.str());
+#endif
+ llvm_unreachable(0);
}
}
}
@@ -140,11 +140,11 @@ void CCState::AnalyzeCallResult(CallSDNode *TheCall, CCAssignFn Fn) {
if (TheCall->isInreg())
Flags.setInReg();
if (Fn(i, VT, VT, CCValAssign::Full, Flags, *this)) {
- std::string msg;
- raw_string_ostream Msg(msg);
- Msg << "Call result #" << i << " has unhandled type "
+#ifndef NDEBUG
+ cerr << "Call result #" << i << " has unhandled type "
<< VT.getMVTString();
- llvm_report_error(Msg.str());
+#endif
+ llvm_unreachable(0);
}
}
}
@@ -153,10 +153,10 @@ void CCState::AnalyzeCallResult(CallSDNode *TheCall, CCAssignFn Fn) {
/// produce a single value.
void CCState::AnalyzeCallResult(MVT VT, CCAssignFn Fn) {
if (Fn(0, VT, VT, CCValAssign::Full, ISD::ArgFlagsTy(), *this)) {
- std::string msg;
- raw_string_ostream Msg(msg);
- Msg << "Call result has unhandled type "
+#ifndef NDEBUG
+ cerr << "Call result has unhandled type "
<< VT.getMVTString();
- llvm_report_error(Msg.str());
+#endif
+ llvm_unreachable(0);
}
}