================
Comment at: lib/Driver/ToolChains.cpp:2704-2711
@@ -2697,1 +2703,10 @@
+  llvm::error_code EC;
+  for (llvm::sys::fs::directory_iterator LI(ParentPath.str(), EC), LE;
+       !EC && LI != LE; LI = LI.increment(EC)) {
+    StringRef VersionText = llvm::sys::path::filename(LI->path());
+    if (addLibStdCXXIncludePaths(GCCMultiArchDir + VersionText.str(),
+                                 TripleStr + BiarchSuffix,
+                                 DriverArgs, CC1Args))
+      break;
+  }
 
----------------
This looks completely wrong. It is adding the first version of the headers that 
happens to be found by walking the directory. This isn't even going to be the 
newest, it could be literally *any* version.


What problem are you actually trying to solve? Is it that the GCC installation 
is under a Major.Minor directory, and the headers are under a Major.Minor.Patch 
directory? Why on earth would that happen? It doesn't make any sense to me and 
so doesn't seem like something we should really support. I expect the GCC 
installation to have the same version number spelling as the libstdc++ 
installation, which seems like a sane place to be. Anything else and we're 
running the risk of version skew.


http://llvm-reviews.chandlerc.com/D2040
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to