mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-27 15:29:51 +00:00
Fix an accidentally duplicated line that caused tblgen to crash on itanium.
Add an assert that catches the real problem earlier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29185 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
96c1ade5c3
commit
0a01212857
@ -399,7 +399,6 @@ FindUniqueOperandCommands(std::vector<std::string> &UniqueOperandCommands,
|
|||||||
// set share the operand.
|
// set share the operand.
|
||||||
bool AllSame = true;
|
bool AllSame = true;
|
||||||
|
|
||||||
NIT = std::find(NIT+1, InstIdxs.end(), CommandIdx);
|
|
||||||
for (NIT = std::find(NIT+1, InstIdxs.end(), CommandIdx);
|
for (NIT = std::find(NIT+1, InstIdxs.end(), CommandIdx);
|
||||||
NIT != InstIdxs.end();
|
NIT != InstIdxs.end();
|
||||||
NIT = std::find(NIT+1, InstIdxs.end(), CommandIdx)) {
|
NIT = std::find(NIT+1, InstIdxs.end(), CommandIdx)) {
|
||||||
@ -559,6 +558,8 @@ void AsmWriterEmitter::run(std::ostream &O) {
|
|||||||
if (AsmWriterInst *Inst = getAsmWriterInstByID(i))
|
if (AsmWriterInst *Inst = getAsmWriterInstByID(i))
|
||||||
if (!Inst->Operands.empty()) {
|
if (!Inst->Operands.empty()) {
|
||||||
unsigned NumOps = NumInstOpsHandled[InstIdxs[i]];
|
unsigned NumOps = NumInstOpsHandled[InstIdxs[i]];
|
||||||
|
assert(NumOps <= Inst->Operands.size() &&
|
||||||
|
"Can't remove this many ops!");
|
||||||
Inst->Operands.erase(Inst->Operands.begin(),
|
Inst->Operands.erase(Inst->Operands.begin(),
|
||||||
Inst->Operands.begin()+NumOps);
|
Inst->Operands.begin()+NumOps);
|
||||||
}
|
}
|
||||||
@ -679,8 +680,8 @@ void AsmWriterEmitter::run(std::ostream &O) {
|
|||||||
EmitInstructions(Instructions, O);
|
EmitInstructions(Instructions, O);
|
||||||
|
|
||||||
O << " }\n";
|
O << " }\n";
|
||||||
|
O << " return true;\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
O << " return true;\n"
|
O << "}\n";
|
||||||
"}\n";
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user