[cfe-commits] [patch] Refactor the include search into different c, c++ and framework functions

Douglas Gregor dgregor at apple.com
Mon Oct 26 15:39:06 PDT 2009


On Oct 21, 2009, at 9:03 PM, Rafael Espindola wrote:

> The attached patch refactors AddDefaultSystemIncludePaths by adding
> helper functions for c, c++ and framework. The only user visible
> differences should be
>
> *) Frameworks are only searched on OS X
> *) The Cygwin c++ headers are now marked as c++ aware. I am almost
> sure that not marking them was a bug.
>
> One reason for doing this is just that the current functions was
> getting large and with lots of nesting. Another, probably more
> important, reason is that I want to add support for defining search
> paths at compile time. With this refactoring this will look like
>
> ...AddDefaultCIncludePaths(..) {
>  If (configure option for C set)  {
>   use it.
>   return;
>   }
>  current run time search.
> }

So this is how we could hook in paths discovered by probing the system  
compiler, for example. Makes sense to me.

> And similarly for c++ and maybe frameworks (if those two paths are not
> the only ones ever used....).
>
> Comments?


Looks good!

	- Doug



More information about the cfe-commits mailing list