Add missing implementation of 'sys::path::is_other' to the support library.
authorJuergen Ributzka <juergen@apple.com>
Thu, 18 Dec 2014 18:19:47 +0000 (18:19 +0000)
committerJuergen Ributzka <juergen@apple.com>
Thu, 18 Dec 2014 18:19:47 +0000 (18:19 +0000)
The header claims that this function exists, but the linker wasn't too happy
about it not being in the library.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224527 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Path.cpp

index a7a991950bca89c0febf4598c9e6fce2d488003b..d84e8867d0ed58df31ebf8efd68d8b86b200e1f9 100644 (file)
@@ -888,6 +888,14 @@ bool is_other(file_status status) {
          !is_directory(status);
 }
 
+std::error_code is_other(const Twine &Path, bool &Result) {
+  file_status FileStatus;
+  if (std::error_code EC = status(Path, FileStatus))
+    return EC;
+  Result = is_other(FileStatus);
+  return std::error_code();
+}
+
 void directory_entry::replace_filename(const Twine &filename, file_status st) {
   SmallString<128> path(Path.begin(), Path.end());
   path::remove_filename(path);