[cfe-commits] r39200 - /cfe/cfe/trunk/Driver/clang.cpp
sabre at cs.uiuc.edu
sabre at cs.uiuc.edu
Wed Jul 11 09:41:05 PDT 2007
Author: sabre
Date: Wed Jul 11 11:41:05 2007
New Revision: 39200
URL: http://llvm.org/viewvc/llvm-project?rev=39200&view=rev
Log:
Add some standard include paths for C++.
Modified:
cfe/cfe/trunk/Driver/clang.cpp
Modified: cfe/cfe/trunk/Driver/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Driver/clang.cpp?rev=39200&r1=39199&r2=39200&view=diff
==============================================================================
--- cfe/cfe/trunk/Driver/clang.cpp (original)
+++ cfe/cfe/trunk/Driver/clang.cpp Wed Jul 11 11:41:05 2007
@@ -645,7 +645,7 @@
/// InitializeIncludePaths - Process the -I options and set them in the
/// HeaderSearch object.
static void InitializeIncludePaths(HeaderSearch &Headers, FileManager &FM,
- Diagnostic &Diags) {
+ Diagnostic &Diags, const LangOptions &Lang) {
// Handle -F... options.
for (unsigned i = 0, e = F_dirs.size(); i != e; ++i)
AddPath(F_dirs[i], Angled, false, true, true, FM);
@@ -718,6 +718,13 @@
// FIXME: temporary hack: hard-coded paths.
// FIXME: get these from the target?
if (!nostdinc) {
+ if (Lang.CPlusPlus) {
+ AddPath("/usr/include/c++/4.0.0", System, true, false, false, FM);
+ AddPath("/usr/include/c++/4.0.0/i686-apple-darwin8", System, true, false,
+ false, FM);
+ AddPath("/usr/include/c++/4.0.0/backward", System, true, false, false,FM);
+ }
+
AddPath("/usr/local/include", System, false, false, false, FM);
AddPath("/usr/lib/gcc/i686-apple-darwin8/4.0.1/include", System,
false, false, false, FM);
@@ -862,7 +869,7 @@
// Process the -I options and set them in the HeaderInfo.
HeaderSearch HeaderInfo(FileMgr);
- InitializeIncludePaths(HeaderInfo, FileMgr, OurDiagnostics);
+ InitializeIncludePaths(HeaderInfo, FileMgr, OurDiagnostics, Options);
// Set up the preprocessor with these options.
More information about the cfe-commits
mailing list