summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Unix/Path.inc
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/Unix/Path.inc')
-rw-r--r--llvm/lib/Support/Unix/Path.inc32
1 files changed, 1 insertions, 31 deletions
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc
index 3cedf64d4b0..a80e0ddb8a1 100644
--- a/llvm/lib/Support/Unix/Path.inc
+++ b/llvm/lib/Support/Unix/Path.inc
@@ -60,24 +60,6 @@
# define PATH_MAX 4096
#endif
-#include <sys/types.h>
-#if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__ANDROID__)
-#include <sys/statvfs.h>
-#define STATVFS statvfs
-#define STATVFS_F_FRSIZE(vfs) vfs.f_frsize
-#else
-#ifdef __OpenBSD__
-#include <sys/param.h>
-#elif defined(__ANDROID__)
-#include <sys/vfs.h>
-#else
-#include <sys/mount.h>
-#endif
-#define STATVFS statfs
-#define STATVFS_F_FRSIZE(vfs) static_cast<uint64_t>(vfs.f_bsize)
-#endif
-
-
using namespace llvm;
namespace llvm {
@@ -88,7 +70,7 @@ namespace fs {
defined(__linux__) || defined(__CYGWIN__) || defined(__DragonFly__)
static int
test_dir(char ret[PATH_MAX], const char *dir, const char *bin)
-{
+{
struct stat sb;
char fullpath[PATH_MAX];
@@ -208,18 +190,6 @@ UniqueID file_status::getUniqueID() const {
return UniqueID(fs_st_dev, fs_st_ino);
}
-ErrorOr<space_info> disk_space(const Twine &Path) {
- struct STATVFS Vfs;
- if (::STATVFS(Path.str().c_str(), &Vfs))
- return std::error_code(errno, std::generic_category());
- auto FrSize = STATVFS_F_FRSIZE(Vfs);
- space_info SpaceInfo;
- SpaceInfo.capacity = static_cast<uint64_t>(Vfs.f_blocks) * FrSize;
- SpaceInfo.free = static_cast<uint64_t>(Vfs.f_bfree) * FrSize;
- SpaceInfo.available = static_cast<uint64_t>(Vfs.f_bavail) * FrSize;
- return SpaceInfo;
-}
-
std::error_code current_path(SmallVectorImpl<char> &result) {
result.clear();
OpenPOWER on IntegriCloud