diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-07-28 00:29:20 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-07-28 00:29:20 +0000 |
commit | 814450a429325339f5445f231c24ced1bf329422 (patch) | |
tree | 07b1f9dea446817c1b9a46200d302bc291df7efb /include/llvm/Support/FileSystem.h | |
parent | 7b2958392c2be221ff1f0d2ffd45d453dec515dd (diff) |
Add an optional 'bool makeAbsolute' in llvm::sys::fs::unique_file function.
If true and 'model' parameter is not an absolute path, a temp directory will be prepended.
Make it true by default to match current behaviour.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136310 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/FileSystem.h')
-rw-r--r-- | include/llvm/Support/FileSystem.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/Support/FileSystem.h b/include/llvm/Support/FileSystem.h index 4f013f89e8..1fd0b7848f 100644 --- a/include/llvm/Support/FileSystem.h +++ b/include/llvm/Support/FileSystem.h @@ -427,10 +427,13 @@ error_code symlink_status(const Twine &path, file_status &result); /// @param model Name to base unique path off of. /// @param result_fs Set to the opened file's file descriptor. /// @param result_path Set to the opened file's absolute path. +/// @param makeAbsolute If true and @model is not an absolute path, a temp +/// directory will be prepended. /// @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); + SmallVectorImpl<char> &result_path, + bool makeAbsolute = true); /// @brief Canonicalize path. /// |