This code will cause an internal error when compiled with -Rpass=inline
int foo(int j) { return j / 10; }
#line 4242 "path/to/autogen-src.dat"
int baz(int j) { return foo(j) * 3; }
$ clang -O2 -g -Rpass=inline -c foo.cc
The problem triggers when BackendConsumer::OptimizationRemarkHandler()
calls SourceMgr.translateFileLineCol(FileMgr.getFile(Filename)...).
There is no entry in FileMgr for "path/to/autogen-src.dat", so
translateFileLineCol() ICEs.
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.
Is there a way to get at that entry?
Thanks. Diego.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits