<div dir="ltr"><div>I'm trying to clone a MachineInstr in the AsmPrinter::EmitInstruction, Here is the code:<br><br>void EsenciaAsmPrinter::EmitInstruction(const MachineInstr *MI) {<br> const MachineFunction *MF = MI->getParent()->getParent();<br> MachineInstr *CloneMI = MF->CloneMachineInstr(MI);<br>...<br>...<br>}<br><br></div><div>The problem is that MF is a const and CloneMachineInstr expects a non-const. Does anybody know if there is a way to create a copy of a given MachineInstr?<br><br></div><div>Any help is appreciated.<br></div><div><div><div><div><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Rail Shafigulin<br></div>Software Engineer <br>Esencia Technologies<br></div></div></div></div>
</div></div></div></div></div>