[cfe-dev] diff: builtin macros

Chris Lattner clattner at apple.com
Thu Sep 2 09:53:26 PDT 2010


On Sep 1, 2010, at 9:15 PM, Vladimir Kirillov wrote:

> Hello, cfe-dev!
> 
> There's a diff to support builtin macros defined at the preprocessor
> initialization time (like __clang__, __i386__, etc) to be also treated
> as builtin (MacroInfo::IsBuiltinMacro), so programs using clang
> libraries would be able to distinct these macros from others properly.
> 
> I have added a new preprocessor keyword __define_builtin (i saw
> __include_macros, so i guess its ok) to implement such feature.
> 
> If you suggest any better way of the implementation -- i'm also willing
> to help then.

Hi Vladimir,

What problem are you trying to solve with this?  Is it sufficient to see if the macro is in the predefines buffer?

-Chris



More information about the cfe-dev mailing list