mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-02 07:32:52 +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:
parent
fb4032f422
commit
b0f96facd6
@ -1126,7 +1126,6 @@ MatchAndEmitInstruction(SMLoc IDLoc,
|
||||
Inst.setOpcode(X86::WAIT);
|
||||
Out.EmitInstruction(Inst);
|
||||
|
||||
delete Operands[0];
|
||||
const char *Repl =
|
||||
StringSwitch<const char*>(Op->getToken())
|
||||
.Case("finit", "fninit")
|
||||
@ -1136,6 +1135,7 @@ MatchAndEmitInstruction(SMLoc IDLoc,
|
||||
.Case("fstsw", "fnstsw")
|
||||
.Default(0);
|
||||
assert(Repl && "Unknown wait-prefixed instruction");
|
||||
delete Operands[0];
|
||||
Operands[0] = X86Operand::CreateToken(Repl, IDLoc);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user