From 76021f010b87fdb96ebd9b98b061fdef00a6f32b Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Tue, 29 Nov 2005 18:44:58 +0000 Subject: [PATCH] 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 --- utils/TableGen/DAGISelEmitter.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp index 68248d7d667..a560bf01977 100644 --- a/utils/TableGen/DAGISelEmitter.cpp +++ b/utils/TableGen/DAGISelEmitter.cpp @@ -1952,7 +1952,12 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) { dynamic_cast(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); } }