[llvm-commits] CVS: llvm/utils/TableGen/AsmWriterEmitter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Jul 18 12:06:13 PDT 2006
Changes in directory llvm/utils/TableGen:
AsmWriterEmitter.cpp updated: 1.37 -> 1.38
---
Log message:
Fix an accidentally duplicated line that caused tblgen to crash on itanium.
Add an assert that catches the real problem earlier.
---
Diffs of the changes: (+4 -3)
AsmWriterEmitter.cpp | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
Index: llvm/utils/TableGen/AsmWriterEmitter.cpp
diff -u llvm/utils/TableGen/AsmWriterEmitter.cpp:1.37 llvm/utils/TableGen/AsmWriterEmitter.cpp:1.38
--- llvm/utils/TableGen/AsmWriterEmitter.cpp:1.37 Tue Jul 18 13:28:27 2006
+++ llvm/utils/TableGen/AsmWriterEmitter.cpp Tue Jul 18 14:06:01 2006
@@ -399,7 +399,6 @@
// set share the operand.
bool AllSame = true;
- NIT = std::find(NIT+1, InstIdxs.end(), CommandIdx);
for (NIT = std::find(NIT+1, InstIdxs.end(), CommandIdx);
NIT != InstIdxs.end();
NIT = std::find(NIT+1, InstIdxs.end(), CommandIdx)) {
@@ -559,6 +558,8 @@
if (AsmWriterInst *Inst = getAsmWriterInstByID(i))
if (!Inst->Operands.empty()) {
unsigned NumOps = NumInstOpsHandled[InstIdxs[i]];
+ assert(NumOps <= Inst->Operands.size() &&
+ "Can't remove this many ops!");
Inst->Operands.erase(Inst->Operands.begin(),
Inst->Operands.begin()+NumOps);
}
@@ -679,8 +680,8 @@
EmitInstructions(Instructions, O);
O << " }\n";
+ O << " return true;\n";
}
- O << " return true;\n"
- "}\n";
+ O << "}\n";
}
More information about the llvm-commits
mailing list