[cfe-dev] Help rewriting the __FILE__ macro

Joerg Sonnenberger joerg at britannica.bec.de
Fri May 25 09:51:49 PDT 2012


On Tue, May 22, 2012 at 08:40:44PM +0200, Erik Cederstrand wrote:
> This has been implemented as an "-iremap=src:dst" option for GCC
> (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47047) and applied to GCC
> in NetBSD (http://www.mail-archive.com/source-changes-full@netbsd.org/msg08590.html)
> by Joerg Sonnenberger. 'src' is meant to be the prefix and 'dst' the replacement.

One important note here. The GCC patch is kind of the 80% solution,
because I couldn't easily figure out how to get the rest of the desired
behavior. It works well for non-debug builds, but for clang, it would be
much nicer to consistently apply the transformations to other path
consumers.

Joerg



More information about the cfe-dev mailing list