<div dir="ltr"><div><div><div>I'm working on a custom VLIW (we call it Escala). At the moment I'm trying to implement EscalaAsmPrinter::EmitInstruction(const MachineInstr *MI). I'm trying to clone an instruction and this produces and error. Below are the code as well as error:<br><br>void EscalaAsmPrinter::EmitInstruction(const MachineInstr *MI) {<br>  const MachineFunction *MF = MI->getParent()->getParent();<br>  MachineInstr *CloneMI = MF->CloneMachineInstr(MI);<br>  ...<br>  ...<br>}<br><br></div>Here is the error:<br><br>lib/Target/Escala/EscalaAsmPrinter.cpp: In member function ‘virtual void {anonymous}::EscalaAsmPrinter::EmitInstruction(const llvm::MachineInstr*)’:<br>lib/Target/Escala/EscalaAsmPrinter.cpp:379:51: error: no matching function for call to ‘llvm::MachineFunction::CloneMachineInstr(const llvm::MachineInstr*&) const’<br>   MachineInstr *CloneMI = MF->CloneMachineInstr(MI);<br>                                                                               ^<br>lib/Target/Escala/EscalaAsmPrinter.cpp:379:51: note: candidate is:<br>In file included from include/llvm/Target/TargetInstrInfo.h:19:0,<br>                 from lib/Target/Escala/EscalaInstrInfo.h:19,<br>                 from lib/Target/Escala/EscalaAsmPrinter.cpp:17:<br>include/llvm/CodeGen/MachineFunction.h:383:17: note: llvm::MachineInstr* llvm::MachineFunction::CloneMachineInstr(const llvm::MachineInstr*) <near match><br>   MachineInstr *CloneMachineInstr(const MachineInstr *Orig);<br>                        ^<br><br></div>This just doesn't make sense to me. I'm missing something, but I can't figure out what exactly. Would someone be able to shed some light on this?<br><br></div>Any help is really appreciated.<br clear="all"><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></div>