search CPATH, C_INCLUDE_PATH, etc patch

Hi, all.

The attached patch implements a FIXME in clang.cpp. Certain environment
variables are searched for include paths, depending on which language is
being targeted. What I used for a "spec" was gcc's behavior and
documentation, but I'm pretty sure I got it right.

The patch is relative to the base llvm directory.

Thanks,
Sam Bishop

search-include-path-env-vars.patch (1.76 KB)

Very very nice, thanks Sam. This should also help avoid adding every target triple and gcc version number to the #include list. People can now just "setenv CPATH <base of #includes>".

Applied:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080225/004499.html

-Chris