summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-08-01 08:55:34 +0000
committerChris Lattner <sabre@nondot.org>2004-08-01 08:55:34 +0000
commitc3d5f3e12a19c75c483d3d2588842277937a851f (patch)
tree6db2c013296866263a1ce59bc6dc63b0507dd78f /utils
parent2d12b2cf7513e7ee855deec0de293311d676cb75 (diff)
downloadllvm-c3d5f3e12a19c75c483d3d2588842277937a851f.tar.gz
llvm-c3d5f3e12a19c75c483d3d2588842277937a851f.tar.bz2
llvm-c3d5f3e12a19c75c483d3d2588842277937a851f.tar.xz
Be picky
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15400 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/AsmWriterEmitter.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/utils/TableGen/AsmWriterEmitter.cpp b/utils/TableGen/AsmWriterEmitter.cpp
index 319fe4f1e9..ea81795e0f 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 ";