<div dir="ltr">On Wed, Jul 13, 2016 at 7:00 AM, Stephen Thomas via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I often find myself staring at IR and wanting to look at the C source code it corresponds to. To do so, I look up the debug identifier for the given IR line, scroll to the bottom of the IR file to find the debug identifier, look at the debug location (source and column), and then look at the source file. Too many steps. What would be great is a tool that took two files, i.e., a .c file and a .bc file, and printed out the IR with the corresponding C source right beneath each IR line. </div><div><br></div><div>It wouldn't be too hard for me to write such a tool, but I thought I'd check to see if something already exists before I reinvent the wheel. Is there anything out there?</div><div><br><br></div></div></blockquote><div><br></div><div>llvm-dis has a <span class="">-<span class=""></span>show-annotations<span class=""> option; not precisely what you're looking for, but it does print the line numbers inline.<br><br></span></span></div><div><span class=""><span class="">-Eli<br></span></span> </div></div></div></div>