From: Chris Lattner Date: Sun, 1 Aug 2004 08:55:34 +0000 (+0000) Subject: Be picky X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=c3d5f3e12a19c75c483d3d2588842277937a851f;p=oota-llvm.git Be picky git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15400 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/utils/TableGen/AsmWriterEmitter.cpp b/utils/TableGen/AsmWriterEmitter.cpp index 319fe4f1e98..ea81795e0f2 100644 --- a/utils/TableGen/AsmWriterEmitter.cpp +++ b/utils/TableGen/AsmWriterEmitter.cpp @@ -75,8 +75,12 @@ void AsmWriterEmitter::run(std::ostream &O) { // If this is a two-address instruction and we are not accessing the // 0th operand, remove an operand. - if (I->second.isTwoAddress && OpNo != 0) + if (I->second.isTwoAddress && OpNo != 0) { + if (OpNo == 1) + throw "Should refer to operand #0 instead of #1 for two-address" + " instruction '" + I->first + "'!"; --OpNo; + } O << "; printOperand(MI->getOperand(" << OpNo << "), MVT::" << getName(I->second.OperandList[OpNo].Ty) << "); O ";