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
This commit is contained in:
Matthias Braun 2015-07-17 17:50:11 +00:00
parent f1192cd7e4
commit 244a6773c7
1 changed files with 3 additions and 5 deletions

View File

@ -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