[cfe-commits] r64862 - /cfe/trunk/lib/Driver/InitHeaderSearch.cpp

Chris Lattner sabre at nondot.org
Tue Feb 17 16:25:16 PST 2009


Author: lattner
Date: Tue Feb 17 18:25:15 2009
New Revision: 64862

URL: http://llvm.org/viewvc/llvm-project?rev=64862&view=rev
Log:
stop searching GCC install directories for standard C headers (but
keep searching for C++ headers when in C++ mode).  In theory clang
should be able to find all of its own headers now.  If not, the
CPATH or C_INCLUDE_PATH environment variables can be specified to
add a include path.

Modified:
    cfe/trunk/lib/Driver/InitHeaderSearch.cpp

Modified: cfe/trunk/lib/Driver/InitHeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/InitHeaderSearch.cpp?rev=64862&r1=64861&r2=64862&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/InitHeaderSearch.cpp (original)
+++ cfe/trunk/lib/Driver/InitHeaderSearch.cpp Tue Feb 17 18:25:15 2009
@@ -108,13 +108,15 @@
 #ifdef LLVM_ON_WIN32
   if (Lang.CPlusPlus) {
     // Mingw32 GCC version 4
-    AddPath("c:/mingw/lib/gcc/mingw32/4.3.0/include/c++", System, true, false, false);
-    AddPath("c:/mingw/lib/gcc/mingw32/4.3.0/include/c++/mingw32", System, true, false, false);
-    AddPath("c:/mingw/lib/gcc/mingw32/4.3.0/include/c++/backward", System, true, false, false);
+    AddPath("c:/mingw/lib/gcc/mingw32/4.3.0/include/c++",
+            System, true, false, false);
+    AddPath("c:/mingw/lib/gcc/mingw32/4.3.0/include/c++/mingw32",
+            System, true, false, false);
+    AddPath("c:/mingw/lib/gcc/mingw32/4.3.0/include/c++/backward",
+            System, true, false, false);
   }
 
   // Mingw32 GCC version 4
-  AddPath("C:/mingw/lib/gcc/mingw32/4.3.0/include", System, false, false, false);
   AddPath("C:/mingw/include", System, false, false, false);
 #else
 
@@ -176,84 +178,9 @@
 
   AddPath("/usr/local/include", System, false, false, false);
 
-  AddPath("/usr/lib/gcc/i686-apple-darwin10/4.2.1/include", System, 
-      false, false, false);
-  AddPath("/usr/lib/gcc/powerpc-apple-darwin10/4.2.1/include", 
-      System, false, false, false);
-
-  // leopard
-  AddPath("/usr/lib/gcc/i686-apple-darwin9/4.0.1/include", System, 
-      false, false, false);
-  AddPath("/usr/lib/gcc/powerpc-apple-darwin9/4.0.1/include", 
-      System, false, false, false);
-  AddPath("/usr/lib/gcc/powerpc-apple-darwin9/"
-      "4.0.1/../../../../powerpc-apple-darwin0/include", 
-      System, false, false, false);
-
-  // tiger
-  AddPath("/usr/lib/gcc/i686-apple-darwin8/4.0.1/include", System, 
-      false, false, false);
-  AddPath("/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/include", 
-      System, false, false, false);
-  AddPath("/usr/lib/gcc/powerpc-apple-darwin8/"
-      "4.0.1/../../../../powerpc-apple-darwin8/include", 
-      System, false, false, false);
-
-  // Ubuntu 7.10 - Gutsy Gibbon
-  AddPath("/usr/lib/gcc/i486-linux-gnu/4.1.3/include", System,
-      false, false, false);
-
-  // Fedora 8
-  AddPath("/usr/lib/gcc/i386-redhat-linux/4.1.2/include", System,
-      false, false, false);
-
-  // Fedora 9
-  AddPath("/usr/lib/gcc/i386-redhat-linux/4.3.0/include", System,
-      false, false, false);
-
-  // Fedora 10
-  AddPath("/usr/lib/gcc/i386-redhat-linux/4.3.2/include", System,
-      false, false, false);
-
-  //Debian testing/lenny x86
-  AddPath("/usr/lib/gcc/i486-linux-gnu/4.2.3/include", System,
-      false, false, false);
-
-  //Debian testing/lenny amd64
-  AddPath("/usr/lib/gcc/x86_64-linux-gnu/4.2.3/include", System,
-      false, false, false);
-
-  // Debian sid amd64
-  AddPath("/usr/lib/gcc/x86_64-linux-gnu/4.3/include", System,
-      false, false, false);
-  AddPath("/usr/lib/gcc/x86_64-linux-gnu/4.3/include-fixed",
-      System, false, false, false);
-
-  // Arch Linux 2008-06-24
-  AddPath("/usr/lib/gcc/i686-pc-linux-gnu/4.3.1/include", System,
-      false, false, false);
-  AddPath("/usr/lib/gcc/i686-pc-linux-gnu/4.3.1/include-fixed", System,
-      false, false, false);
-  AddPath("/usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.1/include", System,
-      false, false, false);
-  AddPath("/usr/lib/gcc/x86_64-unknown-linux-gnu/4.3.1/include-fixed",
-      System, false, false, false);
-
-  // Debian testing/lenny ppc32
-  AddPath("/usr/lib/gcc/powerpc-linux-gnu/4.2.3/include", System,
-      false, false, false);
-
-  // Gentoo x86 stable
-  AddPath("/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include", System,
-      false, false, false);
-
-  // DragonFly
-  AddPath("/usr/libdata/gcc41", System, true, false, false);
-
   AddPath("/usr/include", System, false, false, false);
   AddPath("/System/Library/Frameworks", System, true, false, true);
   AddPath("/Library/Frameworks", System, true, false, true);
-
 #endif
 }
 





More information about the cfe-commits mailing list