From 814450a429325339f5445f231c24ced1bf329422 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Thu, 28 Jul 2011 00:29:20 +0000 Subject: 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 --- include/llvm/Support/FileSystem.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/llvm/Support/FileSystem.h') 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 &result_path); + SmallVectorImpl &result_path, + bool makeAbsolute = true); /// @brief Canonicalize path. /// -- cgit v1.2.3