<div dir="ltr">Hi all,<div><br></div><div>I am trying to write a pass which matches LLVM IR back to assembly in order to track PCs corresponding to certain LLVM IR instructions on an x86-64 machine. LLVM's debug-ir options is/was doing exactly this, but on older versions (i.e. pre-3.6) it crashes while on newer versions it has been deprecated. </div><div><br></div><div>I've recently tried debug-ir with 3.4 and 3.5, but this assert fails: </div><div><span style="font-size:13px;font-family:Arial,Helvetica,sans-serif">llc: llvm-3.4/lib/CodeGen/</span><span style="font-size:13px;font-family:Arial,Helvetica,sans-serif">AsmPrinter/DwarfDebug.cpp:</span><span style="font-size:13px;font-family:Arial,Helvetica,sans-serif">1614: void llvm::DwarfDebug::</span><span style="font-size:13px;font-family:Arial,Helvetica,sans-serif">beginFunction(const llvm::MachineFunction*): Assertion `TheCU && "Unable to find compile unit!"' failed</span></div><div><br></div><div>There is a previous discussion on this, yet no fix: <a href="https://groups.google.com/forum/#!topic/llvm-dev/Oawy2-_lqCU">https://groups.google.com/forum/#!topic/llvm-dev/Oawy2-_lqCU</a></div><div><br></div><div><br></div><div>Any tips for how to solve this would be greatly appreciated.</div><div><br></div><div>Thank you,</div><div>-Bogdan.</div></div>