[PATCH] D17741: adds __FILE_BASENAME__ builtin macro

Joerg Sonnenberger via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 3 16:28:44 PST 2016


On Thu, Mar 03, 2016 at 02:09:17PM -0800, Nico Weber via cfe-commits wrote:
> On Thu, Mar 3, 2016 at 1:50 PM, Joerg Sonnenberger via cfe-commits <
> cfe-commits at lists.llvm.org> wrote:
> 
> > On Thu, Mar 03, 2016 at 07:39:04PM +0000, Weiming Zhao via cfe-commits
> > wrote:
> > > Change the option name to -ffile-macro-prefix-to-remove
> >
> > This still sounds to me like a solution for a very restricted part of a
> > much more generic problem...
> >
> 
> What do you mean?

Storing only the base name of file names is a strict subset of __FILE__
transformations. As mentioned in the linked GCC PR, other uses are
creating build location independent output for larger software projects
etc. For that, reducing to the base name is not an option as it removes
too much information.

Joerg


More information about the cfe-commits mailing list