[llvm] r250923 - Include llvm/Config/config.h in FileSystem.h as it depends upon HAVE_SYS_STAT_H which is defined (or not) in config.h.

Yaron Keren via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 21 11:44:50 PDT 2015


Reverted in r250924, thanks!

Since llvm-config.h does not provide the HAVE_* defines, does it makes
sense for FileSystem.h to include the code

#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif

shouldn't this code go elsewhere? possibly in the code that needs it?


2015-10-21 21:34 GMT+03:00 Reid Kleckner <rnk at google.com>:

> config.h is not an installed header, so this is not allowed. Only
> llvm-config.h is installed.


On Wed, Oct 21, 2015 at 11:28 AM, Yaron Keren via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: yrnkrn
> Date: Wed Oct 21 13:28:35 2015
> New Revision: 250923
>
> URL: http://llvm.org/viewvc/llvm-project?rev=250923&view=rev
> Log:
> Include llvm/Config/config.h in FileSystem.h as it depends upon
> HAVE_SYS_STAT_H which is defined (or not) in config.h.
>
>
> Modified:
>     llvm/trunk/include/llvm/Support/FileSystem.h
>
> Modified: llvm/trunk/include/llvm/Support/FileSystem.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/FileSystem.h?rev=250923&r1=250922&r2=250923&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/Support/FileSystem.h (original)
> +++ llvm/trunk/include/llvm/Support/FileSystem.h Wed Oct 21 13:28:35 2015
> @@ -30,6 +30,7 @@
>  #include "llvm/ADT/IntrusiveRefCntPtr.h"
>  #include "llvm/ADT/SmallString.h"
>  #include "llvm/ADT/Twine.h"
> +#include "llvm/Config/config.h"
>  #include "llvm/Support/DataTypes.h"
>  #include "llvm/Support/ErrorHandling.h"
>  #include "llvm/Support/TimeValue.h"
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151021/55f3345a/attachment-0001.html>


More information about the llvm-commits mailing list