[llvm-commits] [llvm] r115311 - /llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
Benjamin Kramer
benny.kra at googlemail.com
Fri Oct 1 05:25:27 PDT 2010
Author: d0k
Date: Fri Oct 1 07:25:27 2010
New Revision: 115311
URL: http://llvm.org/viewvc/llvm-project?rev=115311&view=rev
Log:
Delete token *after* reading from it.
Modified:
llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
Modified: llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=115311&r1=115310&r2=115311&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmParser/X86AsmParser.cpp Fri Oct 1 07:25:27 2010
@@ -1126,7 +1126,6 @@
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 @@
.Case("fstsw", "fnstsw")
.Default(0);
assert(Repl && "Unknown wait-prefixed instruction");
+ delete Operands[0];
Operands[0] = X86Operand::CreateToken(Repl, IDLoc);
}
More information about the llvm-commits
mailing list