Allow unique_file to take a mode for file permissions, but default

to user only read/write.

Part of rdar://11325849

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156591 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2012-05-11 00:07:44 +00:00
parent 620ee81fa0
commit 61aef8bdf7
3 changed files with 10 additions and 7 deletions

View File

@@ -422,8 +422,8 @@ error_code status_known(const Twine &path, bool &result);
/// @results errc::success if result_{fd,path} have been successfully set,
/// otherwise a platform specific error_code.
error_code unique_file(const Twine &model, int &result_fd,
SmallVectorImpl<char> &result_path,
bool makeAbsolute = true);
SmallVectorImpl<char> &result_path,
bool makeAbsolute = true, unsigned mode = 0600);
/// @brief Canonicalize path.
///