[Support] Add a version of sys::fs::equivalent() that treats errors as false.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156864 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2012-05-15 22:07:14 +00:00
parent 89e369ad61
commit 719daba3e0

View File

@ -309,6 +309,13 @@ bool equivalent(file_status A, file_status B);
/// platform specific error_code.
error_code equivalent(const Twine &A, const Twine &B, bool &result);
/// @brief Simpler version of equivalent for clients that don't need to
/// differentiate between an error and false.
inline bool equivalent(const Twine &A, const Twine &B) {
bool result;
return !equivalent(A, B, result) && result;
}
/// @brief Get file size.
///
/// @param path Input path.