<div dir="ltr"><div><br></div><div>This code will cause an internal error when compiled with -Rpass=inline</div><div><br></div><div><div>int foo(int j) { return j / 10; }</div><div>#line 4242 "path/to/autogen-src.dat"<br>
</div><div>int baz(int j) { return foo(j) * 3; }</div></div><div><br></div><div><br></div><div>$ clang -O2 -g -Rpass=inline -c foo.cc</div><div><br></div><div>The problem triggers when BackendConsumer::OptimizationRemarkHandler() calls SourceMgr.translateFileLineCol(FileMgr.getFile(Filename)...).</div>
<div><br></div><div>There is no entry in FileMgr for "path/to/autogen-src.dat", so translateFileLineCol() ICEs.</div><div><br></div><div>I could check whether FileMgr.getFile() returns a nil entry and show no source location here, but we arguably have a good location for that inline decision, so I would like to show path/to/autogen-src.dat:4242 there.</div>
<div><br></div><div>Is there a way to get at that entry?</div><div><br></div><div><br></div><div>Thanks. Diego.</div></div>