svn commit: r207997 - projects/clangbsd-import/contrib/llvm/tools/clang/lib/Frontend

Ed Schouten ed at FreeBSD.org
Wed May 12 20:15:06 UTC 2010


Author: ed
Date: Wed May 12 20:15:05 2010
New Revision: 207997
URL: http://svn.freebsd.org/changeset/base/207997

Log:
  Fix built-in header location of Clang.

Modified:
  projects/clangbsd-import/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp

Modified: projects/clangbsd-import/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp
==============================================================================
--- projects/clangbsd-import/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp	Wed May 12 20:10:29 2010	(r207996)
+++ projects/clangbsd-import/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp	Wed May 12 20:15:05 2010	(r207997)
@@ -14,6 +14,7 @@
 #include "clang/Frontend/Utils.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/LangOptions.h"
+#include "clang/Basic/Version.h"
 #include "clang/Frontend/HeaderSearchOptions.h"
 #include "clang/Lex/HeaderSearch.h"
 #include "llvm/ADT/SmallString.h"
@@ -480,6 +481,8 @@ void InitHeaderSearch::AddDefaultCInclud
     break;
   }
 
+  AddPath("/usr/include/clang/" CLANG_VERSION_STRING,
+    System, false, false, false);
   AddPath("/usr/include", System, false, false, false);
 }
 
@@ -812,6 +815,7 @@ void clang::ApplyHeaderSearchOptions(Hea
   else
     Init.AddDelimitedPaths(HSOpts.CEnvIncPath);
 
+#if 0 /* XXX: Always points to an invalid path. */
   if (HSOpts.UseBuiltinIncludes) {
     // Ignore the sys root, we *always* look for clang headers relative to
     // supplied path.
@@ -819,6 +823,7 @@ void clang::ApplyHeaderSearchOptions(Hea
     P.appendComponent("include");
     Init.AddPath(P.str(), System, false, false, false, /*IgnoreSysRoot=*/ true);
   }
+#endif
 
   if (HSOpts.UseStandardIncludes)
     Init.AddDefaultSystemIncludePaths(Lang, Triple, 


More information about the svn-src-projects mailing list