From: Matthias Braun Date: Fri, 17 Jul 2015 17:50:11 +0000 (+0000) Subject: Use llvm_unreachable() instead of report_fatal_error() if the machine model is incomplete X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=63f73d7b803f77f50cdf8387be80370c14687186;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242551 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/TargetSchedule.cpp b/lib/CodeGen/TargetSchedule.cpp index 299380d9268..fc656396ade 100644 --- a/lib/CodeGen/TargetSchedule.cpp +++ b/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