aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
diff options
context:
space:
mode:
authorMichal Gorny <mgorny@gentoo.org>2017-02-22 18:09:15 +0000
committerMichal Gorny <mgorny@gentoo.org>2017-02-22 18:09:15 +0000
commit5ddd2a5bdada3792380b1a87f8cb3b394be9860d (patch)
tree2998de69660d51f692fc65013c45a2f1d95b17d8 /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
parent1aeb0e73e0c37105ede0de7a1b36e20ae406e3b6 (diff)
downloadllvm-5ddd2a5bdada3792380b1a87f8cb3b394be9860d.zip
llvm-5ddd2a5bdada3792380b1a87f8cb3b394be9860d.tar.gz
llvm-5ddd2a5bdada3792380b1a87f8cb3b394be9860d.tar.bz2
[Support] Provide linux/magic.h fallback for older kernels
The function for distinguishing local and remote files added in r295768 unconditionally uses linux/magic.h header to provide necessary filesystem magic numbers. However, in kernel headers predating 2.6.18 the magic numbers are spread throughout multiple include files. Furthermore, LLVM did not require kernel headers being installed so far. To increase the portability across different versions of Linux kernel and different Linux systems, add CMake header checks for linux/magic.h and -- if it is missing -- the linux/nfs_fs.h and linux/smb.h headers which contained the numbers previously. Furthermore, since the numbers are static and the feature does not seem critical enough to make LLVM require kernel headers at all, add fallback constants for the case when none of the necessary headers is available. Differential Revision: https://reviews.llvm.org/D30261 llvm-svn: 295854
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions