diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-26 15:21:13 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-06-26 15:21:13 +0000 |
commit | 4ae6d4042b5335a97da54110b7e9a4a59e377485 (patch) | |
tree | a86ab2dd979a218ae1e9014f54b8c5b8a6a4b965 /include/llvm | |
parent | df0f525cc49511cf9dca82d77b93675bcaf5103c (diff) | |
download | external_llvm-4ae6d4042b5335a97da54110b7e9a4a59e377485.zip external_llvm-4ae6d4042b5335a97da54110b7e9a4a59e377485.tar.gz external_llvm-4ae6d4042b5335a97da54110b7e9a4a59e377485.tar.bz2 |
Add a convenience functions that don't return if the directory existed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184955 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/Support/FileSystem.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/Support/FileSystem.h b/include/llvm/Support/FileSystem.h index c5fe2a5..558145c 100644 --- a/include/llvm/Support/FileSystem.h +++ b/include/llvm/Support/FileSystem.h @@ -271,6 +271,13 @@ error_code copy_file(const Twine &from, const Twine &to, /// otherwise a platform specific error_code. error_code create_directories(const Twine &path, bool &existed); +/// @brief Convenience function for clients that don't need to know if the +/// directory existed or not. +inline error_code create_directories(const Twine &Path) { + bool Existed; + return create_directories(Path, Existed); +} + /// @brief Create the directory in path. /// /// @param path Directory to create. @@ -279,6 +286,13 @@ error_code create_directories(const Twine &path, bool &existed); /// otherwise a platform specific error_code. error_code create_directory(const Twine &path, bool &existed); +/// @brief Convenience function for clients that don't need to know if the +/// directory existed or not. +inline error_code create_directory(const Twine &Path) { + bool Existed; + return create_directory(Path, Existed); +} + /// @brief Create a hard link from \a from to \a to. /// /// @param to The path to hard link to. |