[llvm-commits] CVS: llvm/utils/TableGen/AsmWriterEmitter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Aug 1 01:55:44 PDT 2004
Changes in directory llvm/utils/TableGen:
AsmWriterEmitter.cpp updated: 1.2 -> 1.3
---
Log message:
Be picky
---
Diffs of the changes: (+5 -1)
Index: llvm/utils/TableGen/AsmWriterEmitter.cpp
diff -u llvm/utils/TableGen/AsmWriterEmitter.cpp:1.2 llvm/utils/TableGen/AsmWriterEmitter.cpp:1.3
--- llvm/utils/TableGen/AsmWriterEmitter.cpp:1.2 Sun Aug 1 02:43:02 2004
+++ llvm/utils/TableGen/AsmWriterEmitter.cpp Sun Aug 1 03:55:34 2004
@@ -75,8 +75,12 @@
// 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 ";
More information about the llvm-commits
mailing list