From f97999dc4631acf35aa0b6050df0e056bc4bfabb Mon Sep 17 00:00:00 2001 From: Cameron Esfahani Date: Tue, 11 Aug 2015 01:15:07 +0000 Subject: Explicitly clear the MI operand list when getInstruction() is called. Call MI.clear() within MCD::OPC_Decode case and inside of translateInstruction() for the X86 target. Remove now unnecessary MI.clear() from ARMDisassembler. Summary: Explicitly clear the MI operand list when getInstruction() is called. Reviewers: hfinkel, t.p.northover, hvarga, kparzysz, jyknight, qcolombet, uweigand Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D11665 llvm-svn: 244557 --- llvm/utils/TableGen/FixedLenDecoderEmitter.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/utils/TableGen/FixedLenDecoderEmitter.cpp') diff --git a/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp b/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp index cbf40a90b4d..791e853c025 100644 --- a/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp +++ b/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp @@ -2170,6 +2170,7 @@ static void emitDecodeInstruction(formatted_raw_ostream &OS) { << " unsigned DecodeIdx = decodeULEB128(Ptr, &Len);\n" << " Ptr += Len;\n" << "\n" + << " MI.clear();\n" << " MI.setOpcode(Opc);\n" << " bool DecodeComplete;\n" << " S = decodeToMCInst(S, DecodeIdx, insn, MI, Address, DisAsm, DecodeComplete);\n" -- cgit v1.2.3