[cfe-commits] r104921 - /cfe/trunk/lib/Frontend/InitHeaderSearch.cpp

Daniel Dunbar daniel at zuster.org
Thu May 27 18:54:32 PDT 2010


Author: ddunbar
Date: Thu May 27 20:54:31 2010
New Revision: 104921

URL: http://llvm.org/viewvc/llvm-project?rev=104921&view=rev
Log:
Frontend: Sprinkle in some C++ header paths for ARM/Darwin. Also, don't add x86
paths on non-x86.

I really detest this file.

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

Modified: cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitHeaderSearch.cpp?rev=104921&r1=104920&r2=104921&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitHeaderSearch.cpp (original)
+++ cfe/trunk/lib/Frontend/InitHeaderSearch.cpp Thu May 27 20:54:31 2010
@@ -559,10 +559,25 @@
     AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.3.0");
     break;
   case llvm::Triple::Darwin:
-    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.2.1",
-                                "i686-apple-darwin10", "", "x86_64", triple);
-    AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.0.0",
-                                "i686-apple-darwin8", "", "", triple);
+    switch (triple.getArch()) {
+    default: break;
+
+    case llvm::Triple::x86:
+    case llvm::Triple::x86_64:
+      AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.2.1",
+                                  "i686-apple-darwin10", "", "x86_64", triple);
+      AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.0.0",
+                                  "i686-apple-darwin8", "", "", triple);
+      break;
+
+    case llvm::Triple::arm:
+    case llvm::Triple::thumb:
+      AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.2.1",
+                                  "arm-apple-darwin10", "v7", "", triple);
+      AddGnuCPlusPlusIncludePaths("/usr/include/c++/4.2.1",
+                                  "arm-apple-darwin10", "v6", "", triple);
+      break;
+    }
     break;
   case llvm::Triple::DragonFly:
     AddPath("/usr/include/c++/4.1", System, true, false, false);





More information about the cfe-commits mailing list