diff options
author | Juergen Ributzka <juergen@apple.com> | 2014-12-18 18:19:47 +0000 |
---|---|---|
committer | Juergen Ributzka <juergen@apple.com> | 2014-12-18 18:19:47 +0000 |
commit | 84ba342ba99c37dc9f4c72b9c80f4c4be439cbc3 (patch) | |
tree | bdf6f8123ed51e0c40ed8986bfb3d02d0f82d4ec /llvm/lib/Support/Path.cpp | |
parent | 034531d7af99680c30b81bb50e5c04c0ccc5f8df (diff) | |
download | bcm5719-llvm-84ba342ba99c37dc9f4c72b9c80f4c4be439cbc3.tar.gz bcm5719-llvm-84ba342ba99c37dc9f4c72b9c80f4c4be439cbc3.zip |
Add missing implementation of 'sys::path::is_other' to the support library.
The header claims that this function exists, but the linker wasn't too happy
about it not being in the library.
llvm-svn: 224527
Diffstat (limited to 'llvm/lib/Support/Path.cpp')
-rw-r--r-- | llvm/lib/Support/Path.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Support/Path.cpp b/llvm/lib/Support/Path.cpp index a7a991950bc..d84e8867d0e 100644 --- a/llvm/lib/Support/Path.cpp +++ b/llvm/lib/Support/Path.cpp @@ -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); |