summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/TargetSchedule.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-07-17 17:50:11 +0000
committerMatthias Braun <matze@braunis.de>2015-07-17 17:50:11 +0000
commit244a6773c7f888905a365f78b0fc16d9f2bcc4b8 (patch)
treee18349094322b6ef02a706687504d2b694bc4e7f /llvm/lib/CodeGen/TargetSchedule.cpp
parentf1192cd7e40e7f94f0419e5ce33c56f73fb63427 (diff)
downloadbcm5719-llvm-244a6773c7f888905a365f78b0fc16d9f2bcc4b8.tar.gz
bcm5719-llvm-244a6773c7f888905a365f78b0fc16d9f2bcc4b8.zip
Use llvm_unreachable() instead of report_fatal_error() if the machine model is incomplete
This error is for developers only so it makes sense to abort and get a backtrace. llvm-svn: 242551
Diffstat (limited to 'llvm/lib/CodeGen/TargetSchedule.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetSchedule.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/TargetSchedule.cpp b/llvm/lib/CodeGen/TargetSchedule.cpp
index 299380d9268..fc656396ade 100644
--- a/llvm/lib/CodeGen/TargetSchedule.cpp
+++ b/llvm/lib/CodeGen/TargetSchedule.cpp
@@ -211,11 +211,9 @@ unsigned TargetSchedModel::computeOperandLatency(
if (SCDesc->isValid() && !DefMI->getOperand(DefOperIdx).isImplicit()
&& !DefMI->getDesc().OpInfo[DefOperIdx].isOptionalDef()
&& SchedModel.isComplete()) {
- std::string Err;
- raw_string_ostream ss(Err);
- ss << "DefIdx " << DefIdx << " exceeds machine model writes for "
- << *DefMI;
- report_fatal_error(ss.str());
+ errs() << "DefIdx " << DefIdx << " exceeds machine model writes for "
+ << *DefMI;
+ llvm_unreachable("incomplete machine model");
}
#endif
// FIXME: Automatically giving all implicit defs defaultDefLatency is
OpenPOWER on IntegriCloud