diff options
Diffstat (limited to 'include/llvm/Support/FileSystem.h')
-rw-r--r-- | include/llvm/Support/FileSystem.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Support/FileSystem.h b/include/llvm/Support/FileSystem.h index 55565cd..4bee205 100644 --- a/include/llvm/Support/FileSystem.h +++ b/include/llvm/Support/FileSystem.h @@ -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. |