mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
Delete token *after* reading from it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115311 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1126,7 +1126,6 @@ MatchAndEmitInstruction(SMLoc IDLoc,
|
|||||||
Inst.setOpcode(X86::WAIT);
|
Inst.setOpcode(X86::WAIT);
|
||||||
Out.EmitInstruction(Inst);
|
Out.EmitInstruction(Inst);
|
||||||
|
|
||||||
delete Operands[0];
|
|
||||||
const char *Repl =
|
const char *Repl =
|
||||||
StringSwitch<const char*>(Op->getToken())
|
StringSwitch<const char*>(Op->getToken())
|
||||||
.Case("finit", "fninit")
|
.Case("finit", "fninit")
|
||||||
@@ -1136,6 +1135,7 @@ MatchAndEmitInstruction(SMLoc IDLoc,
|
|||||||
.Case("fstsw", "fnstsw")
|
.Case("fstsw", "fnstsw")
|
||||||
.Default(0);
|
.Default(0);
|
||||||
assert(Repl && "Unknown wait-prefixed instruction");
|
assert(Repl && "Unknown wait-prefixed instruction");
|
||||||
|
delete Operands[0];
|
||||||
Operands[0] = X86Operand::CreateToken(Repl, IDLoc);
|
Operands[0] = X86Operand::CreateToken(Repl, IDLoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user