[llvm-commits] [llvm] r123345 - in /llvm/trunk: include/llvm/Support/PathV1.h lib/Support/PathV2.cpp
Michael J. Spencer
bigcheesegs at gmail.com
Wed Jan 12 15:55:06 PST 2011
Author: mspencer
Date: Wed Jan 12 17:55:06 2011
New Revision: 123345
URL: http://llvm.org/viewvc/llvm-project?rev=123345&view=rev
Log:
Support/Path: Deprecate PathV1::IsSymlink and replace all uses with PathV2::is_symlink.
Modified:
llvm/trunk/include/llvm/Support/PathV1.h
llvm/trunk/lib/Support/PathV2.cpp
Modified: llvm/trunk/include/llvm/Support/PathV1.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/PathV1.h?rev=123345&r1=123344&r2=123345&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/PathV1.h (original)
+++ llvm/trunk/include/llvm/Support/PathV1.h Wed Jan 12 17:55:06 2011
@@ -394,7 +394,8 @@
/// existing symbolic link.
/// @returns true if the pathname references an existing symlink.
/// @brief Determines if the path is a symlink in the file system.
- bool isSymLink() const;
+ LLVM_ATTRIBUTE_DEPRECATED(bool isSymLink() const,
+ LLVM_PATH_DEPRECATED_MSG(fs::is_symlink));
/// This function determines if the path name references a readable file
/// or directory in the file system. This function checks for
Modified: llvm/trunk/lib/Support/PathV2.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/PathV2.cpp?rev=123345&r1=123344&r2=123345&view=diff
==============================================================================
--- llvm/trunk/lib/Support/PathV2.cpp (original)
+++ llvm/trunk/lib/Support/PathV2.cpp Wed Jan 12 17:55:06 2011
@@ -660,6 +660,14 @@
return status.type() == file_type::symlink_file;
}
+error_code is_symlink(const Twine &path, bool &result) {
+ file_status st;
+ if (error_code ec = status(path, st))
+ return ec;
+ result = is_symlink(st);
+ return success;
+}
+
bool is_other(file_status status) {
return exists(status) &&
!is_regular_file(status) &&
More information about the llvm-commits
mailing list