Better error message when unrecognized opcode is seen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24519 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2005-11-29 18:44:58 +00:00
parent 425a96971f
commit 76021f010b

View File

@ -1952,7 +1952,12 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
dynamic_cast<IntInit*>(PatternsToMatch[i].first->getLeafValue())) {
PatternsByOpcode[getSDNodeNamed("imm")].push_back(&PatternsToMatch[i]);
} else {
assert(0 && "Unknown leaf value");
std::cerr << "Unrecognized opcode '";
PatternsToMatch[i].first->dump();
std::cerr << "' on tree pattern '";
std::cerr << PatternsToMatch[i].second->getOperator()->getName();
std::cerr << "'!\n";
exit(1);
}
}