Can someone on linux review this please?

-Chris

Begin forwarded message:

> From: nobled <[email protected]>
> Date: August 29, 2010 1:16:46 PM PDT
> To: [email protected]
> Subject: [LLVMdev] [PATCH] Fix `clang -print-file-name=include`
> 
> I noticed this problem with Ubuntu's clang package -- clang 2.7's
> internal include headers are shipped in /usr/lib/clang/1.1/include,
> but running `llvm-clang -print-file-name=include` just prints
> "include" (ie not found). Same bug is in SVN trunk - fix attached; it
> assumes the header location is always tied to the clang version for
> 2.8 onward (correct me if I'm wrong). I don't know how to write a
> regression test, but if someone could point the way I'll write one for
> this too.
> 
> Also, gcc seems to have a second include directory that clang doesn't,
> "include-fixed", which has, well, system headers that are 'fixed' to
> be ANSI-C-compatible. Does clang just not need an equivalent to that?
Index: lib/Driver/ToolChains.cpp
===================================================================
--- lib/Driver/ToolChains.cpp	(revision 112455)
+++ lib/Driver/ToolChains.cpp	(working copy)
@@ -1084,7 +1084,8 @@
 
 Linux::Linux(const HostInfo &Host, const llvm::Triple& Triple)
   : Generic_GCC(Host, Triple) {
-  getFilePaths().push_back(getDriver().Dir + "/../lib/clang/1.0/");
+  getFilePaths().push_back(getDriver().Dir +
+                           "/../lib/clang/" CLANG_VERSION_STRING "/");
   getFilePaths().push_back("/lib/");
   getFilePaths().push_back("/usr/lib/");
 
> _______________________________________________
> LLVM Developers mailing list
> [email protected]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

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

Reply via email to