summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-26 15:21:13 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-26 15:21:13 +0000
commitf530fd75b967ad816ff030a44493bc05215567ad (patch)
treee52b8ea1eaaee9442fe6aaff08713603164dd535 /llvm
parent68770d24aa6db1a0533056ddf49fedb14604f251 (diff)
downloadbcm5719-llvm-f530fd75b967ad816ff030a44493bc05215567ad.tar.gz
bcm5719-llvm-f530fd75b967ad816ff030a44493bc05215567ad.zip
Add a convenience functions that don't return if the directory existed.
llvm-svn: 184955
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Support/FileSystem.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/FileSystem.h b/llvm/include/llvm/Support/FileSystem.h
index c5fe2a5b0a1..558145c246f 100644
--- a/llvm/include/llvm/Support/FileSystem.h
+++ b/llvm/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.
OpenPOWER on IntegriCloud