diff options
| author | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-01-11 01:21:55 +0000 |
|---|---|---|
| committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-01-11 01:21:55 +0000 |
| commit | 0d771edeee525b2e5438e38c812af0c871133d0b (patch) | |
| tree | 0ba37a576e1931156f7891ed3bbdf9e48298bf84 /llvm/lib/Support/PathV2.cpp | |
| parent | e503f89b4b146fc2d3f23d9ed04b4d1f79f3a129 (diff) | |
| download | llvm-0d771edeee525b2e5438e38c812af0c871133d0b.zip llvm-0d771edeee525b2e5438e38c812af0c871133d0b.tar.gz llvm-0d771edeee525b2e5438e38c812af0c871133d0b.tar.bz2 | |
Support/Path: Deprecate PathV1::isDirectory and replace all uses with PathV2::is_directory.
llvm-svn: 123209
Diffstat (limited to 'llvm/lib/Support/PathV2.cpp')
| -rw-r--r-- | llvm/lib/Support/PathV2.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/lib/Support/PathV2.cpp b/llvm/lib/Support/PathV2.cpp index 3b232ab..f2ca34b 100644 --- a/llvm/lib/Support/PathV2.cpp +++ b/llvm/lib/Support/PathV2.cpp @@ -636,10 +636,26 @@ bool is_directory(file_status status) { return status.type() == file_type::directory_file; } +error_code is_directory(const Twine &path, bool &result) { + file_status st; + if (error_code ec = status(path, st)) + return ec; + result = is_directory(st); + return success; +} + bool is_regular_file(file_status status) { return status.type() == file_type::regular_file; } +error_code is_regular_file(const Twine &path, bool &result) { + file_status st; + if (error_code ec = status(path, st)) + return ec; + result = is_regular_file(st); + return success; +} + bool is_symlink(file_status status) { return status.type() == file_type::symlink_file; } |
