diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-05 21:19:35 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-05 21:19:35 +0000 |
commit | 01c9d28fece665972c9d355ae738cf3fc73d22d4 (patch) | |
tree | d8bd13b5fca19815190b2cbb963917e557706aa2 | |
parent | 200c748a8643cd127271f4d6849da1e147d4442f (diff) | |
download | llvm-01c9d28fece665972c9d355ae738cf3fc73d22d4.tar.gz llvm-01c9d28fece665972c9d355ae738cf3fc73d22d4.tar.bz2 llvm-01c9d28fece665972c9d355ae738cf3fc73d22d4.tar.xz |
Remove unique_file now that it is unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185728 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Support/FileSystem.h | 30 | ||||
-rw-r--r-- | lib/Support/Path.cpp | 17 |
2 files changed, 0 insertions, 47 deletions
diff --git a/include/llvm/Support/FileSystem.h b/include/llvm/Support/FileSystem.h index b729a992c3..194f5f5c6a 100644 --- a/include/llvm/Support/FileSystem.h +++ b/include/llvm/Support/FileSystem.h @@ -545,36 +545,6 @@ bool status_known(file_status s); /// platform specific error_code. error_code status_known(const Twine &path, bool &result); -/// @brief Generate a unique path and open it as a file. -/// -/// Generates a unique path suitable for a temporary file and then opens it as a -/// file. The name is based on \a model with '%' replaced by a random char in -/// [0-9a-f]. If \a model is not an absolute path, a suitable temporary -/// directory will be prepended. -/// -/// This is an atomic operation. Either the file is created and opened, or the -/// file system is left untouched. -/// -/// clang-%%-%%-%%-%%-%%.s => /tmp/clang-a0-b1-c2-d3-e4.s -/// -/// @param model Name to base unique path off of. -/// @param result_fd Set to the opened file's file descriptor. -/// @param result_path Set to the opened file's absolute path. -/// @param makeAbsolute If true and \a model is not an absolute path, a temp -/// directory will be prepended. -/// @param mode Set to the file open mode; since this is most often used for -/// temporary files, mode defaults to owner_read | owner_write. -/// @returns 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, - unsigned mode = owner_read | owner_write); - -/// @brief Simpler version for clients that don't want an open file. -error_code unique_file(const Twine &Model, SmallVectorImpl<char> &ResultPath, - bool MakeAbsolute = true); - /// @brief Create a uniquely named file. /// /// Generates a unique path suitable for a temporary file and then opens it as a diff --git a/lib/Support/Path.cpp b/lib/Support/Path.cpp index 58c7c96c66..69dd6f5a71 100644 --- a/lib/Support/Path.cpp +++ b/lib/Support/Path.cpp @@ -637,23 +637,6 @@ bool is_relative(const Twine &path) { namespace fs { -// This is a mkostemps with a different pattern. Unfortunatelly OS X (ond *BSD) -// don't have it. We should try using mkostemps on systems that have it. -error_code unique_file(const Twine &Model, int &ResultFD, - SmallVectorImpl<char> &ResultPath, bool MakeAbsolute, - unsigned Mode) { - return createUniqueEntity(Model, ResultFD, ResultPath, MakeAbsolute, Mode, - FS_File); -} - -// This is a mktemp with a differet pattern. We use createUniqueEntity mostly -// for consistency. We should try using mktemp. -error_code unique_file(const Twine &Model, SmallVectorImpl<char> &ResultPath, - bool MakeAbsolute) { - int Dummy; - return createUniqueEntity(Model, Dummy, ResultPath, MakeAbsolute, 0, FS_Name); -} - error_code createUniqueFile(const Twine &Model, int &ResultFd, SmallVectorImpl<char> &ResultPath, unsigned Mode) { return createUniqueEntity(Model, ResultFd, ResultPath, false, Mode, FS_File); |